-
Notifications
You must be signed in to change notification settings - Fork 16
Added support for passing values read from a file using --file #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9e9da88
Added support for passing values read from a file using --from-file
tehsis d369eef
Use --file parameter in env set to be consistent with env edit behavior
tehsis 0fde71c
Do not add an extra \n if the value already contains one when using -…
tehsis 41a8665
Add string value option to help for --value in get and open
tehsis 438af61
Added break to prevent default execution
tehsis 584f6de
added --file from esc env set to changelog
tehsis e4affaa
Handle err when reading from stdin
tehsis 922d404
Check that content is utf-8 valid also when coming from stdin
tehsis 089db32
Improved handling args when using --file and added tests"
tehsis 6815954
added test for --file with --string
tehsis 17c7a46
Added tests for the case of trying to use binary files in esc env set…
tehsis 089237e
removed pending changes that were already merged to changelog
tehsis cf3499e
Added tests with multiline files for esc env set --file
tehsis 5c48797
changed help test for --file in env set
tehsis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,104 @@ | ||
| run: | | ||
| echo "hello" | esc env set default/test foo -f=- | ||
| esc env get default/test | ||
| echo "hello world" >test.file | ||
| esc env set default/test foo -f=test.file | ||
| esc env get default/test | ||
| esc env get default/test --value string | ||
| esc env set default/test foo -f=test.file --string | ||
tehsis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| esc env get default/test | ||
| esc env set default/test -f=test.file || echo -n "" | ||
| esc env set -f=test.file || echo -n "" | ||
| esc env set default/test -f=binary foo || echo -n "" | ||
| esc env set -f=- default/test foo <binary || echo -n "" | ||
| esc env set --string -f=multiline default/test foo | ||
| esc env get default/test foo --value string | ||
| process: | ||
| fs: | ||
| binary: !!binary sFOZJGpvmbYHwHRLnCYSnQ== | ||
| multiline: | | ||
| this is a | ||
| multiline | ||
| file | ||
| environments: | ||
| test-user/default/test: | ||
| values: | ||
| foo: bar | ||
|
|
||
| --- | ||
| > esc env set default/test foo -f=- | ||
| > esc env get default/test | ||
| # Value | ||
| ```json | ||
| { | ||
| "foo": "hello" | ||
| } | ||
| ``` | ||
| # Definition | ||
| ```yaml | ||
| values: | ||
| foo: hello | ||
|
|
||
| ``` | ||
|
|
||
| > esc env set default/test foo -f=test.file | ||
| > esc env get default/test | ||
| # Value | ||
| ```json | ||
| { | ||
| "foo": "hello world" | ||
| } | ||
| ``` | ||
| # Definition | ||
| ```yaml | ||
| values: | ||
| foo: hello world | ||
|
|
||
| ``` | ||
|
|
||
| > esc env get default/test --value string | ||
| "foo"="hello world" | ||
| > esc env set default/test foo -f=test.file --string | ||
| > esc env get default/test | ||
| # Value | ||
| ```json | ||
| { | ||
| "foo": "hello world\n" | ||
| } | ||
| ``` | ||
| # Definition | ||
| ```yaml | ||
| values: | ||
| foo: | | ||
| hello world | ||
|
|
||
| ``` | ||
|
|
||
| > esc env set default/test -f=test.file | ||
| > esc env set -f=test.file | ||
| > esc env set default/test -f=binary foo | ||
| > esc env set -f=- default/test foo | ||
| > esc env set --string -f=multiline default/test foo | ||
| > esc env get default/test foo --value string | ||
| this is a | ||
| multiline | ||
| file | ||
|
|
||
| --- | ||
| > esc env set default/test foo -f=- | ||
| > esc env get default/test | ||
| > esc env set default/test foo -f=test.file | ||
| > esc env get default/test | ||
| > esc env get default/test --value string | ||
| > esc env set default/test foo -f=test.file --string | ||
| > esc env get default/test | ||
| > esc env set default/test -f=test.file | ||
| Error: expected a path | ||
| > esc env set -f=test.file | ||
| Error: accepts between 1 and 3 arg(s), received 0 | ||
| > esc env set default/test -f=binary foo | ||
| Error: file content must be valid UTF-8 | ||
| > esc env set -f=- default/test foo | ||
| Error: file content must be valid UTF-8 | ||
| > esc env set --string -f=multiline default/test foo | ||
| > esc env get default/test foo --value string | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.