-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Do not lose edits when the new YAML contains errors - Automatically append "-w" to the editor if it is `code` - Default to `vi` if no other editor is present - Fix the help text to remove the term 'open' Fixes #25. Fixes #27.
- Loading branch information
Showing
11 changed files
with
184 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
run: env edit test | ||
process: | ||
environ: | ||
EDITOR: my-editor | ||
commands: | ||
my-editor: | | ||
echo -n "" >$1 | ||
environments: | ||
test-user/test: | ||
values: | ||
foo: bar | ||
stderr: | | ||
Aborting edit due to empty definition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
run: env edit test | ||
process: | ||
environ: | ||
EDITOR: my-editor | ||
commands: | ||
my-editor: | | ||
echo -e "imports:\n" >$1 | ||
environments: | ||
test-user/test: | ||
values: | ||
foo: bar | ||
stderr: | | ||
Error: imports must be a list | ||
on test line 1: | ||
1: imports: | ||
Press ENTER to continue editing or ^D to exit | ||
Aborting edit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ environments: | |
test-user/test: | ||
values: | ||
foo: bar | ||
stdout: | | ||
Environment updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
run: env edit test --editor code | ||
process: | ||
commands: | ||
code: | | ||
if [[ "$1" -ne "-w" ]]; then exit 1; fi | ||
echo -e "values:\n foo: baz\n" >$2 | ||
environments: | ||
test-user/test: | ||
values: | ||
foo: bar | ||
stdout: | | ||
Environment updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ environments: | |
test-user/test: | ||
values: | ||
foo: bar | ||
stdout: | | ||
Environment updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
run: env edit test | ||
error: No available editor. Please use the --editor flag or set one of the VISUAL or EDITOR environment variables. | ||
stderr: | | ||
Error: No available editor. Please use the --editor flag or set one of the VISUAL or EDITOR environment variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
run: env edit test | ||
process: | ||
commands: | ||
vi: | | ||
echo -e "values:\n foo: baz\n" >$1 | ||
environments: | ||
test-user/test: | ||
values: | ||
foo: bar | ||
stdout: | | ||
Environment updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ environments: | |
test-user/test: | ||
values: | ||
foo: bar | ||
stdout: | | ||
Environment updated. |