editor = os.environ.get("P4EDITOR")
else:
editor = read_pipe("git var GIT_EDITOR").strip()
- system([editor, template_file])
+ system(["sh", "-c", ('%s "$@"' % editor), editor, template_file])
# If the file was not saved, prompt to see if this patch should
# be skipped. But skip this verification step if configured so.
cd "$git" &&
echo line >>file1 &&
git commit -a -m "change 5" &&
- P4EDITOR="$TRASH_DIRECTORY/ed.sh" &&
+ P4EDITOR="\"$TRASH_DIRECTORY/ed.sh\"" &&
export P4EDITOR &&
git p4 submit &&
p4 changes //depot/... >wc &&
# Check that the P4EDITOR argument can be given command-line
# options, which git-p4 will then pass through to the shell.
-test_expect_failure 'EDITOR with options' '
+test_expect_success 'EDITOR with options' '
git p4 clone --dest="$git" //depot &&
test_when_finished cleanup_git &&
(