-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with "$$" in Script blocks
Prior to this commit Steps with Scripts that include two dollar signs resulted in only one dollar sign ending up in the final executed script. This is because the script is passed into an init container via its "args" field and Kubernetes replaces instances of the literal string "$$" with "$". This is a documented behaviour of the "args" field (sort of) but it doesn't make sense to have those replacements happen for our "script" blocks. "$$" in bash scripts is the current process id so replacing this character sequence can be problematic. This commit replaces instances of two dollar signs in a script with four dollar signs. Kubernetes then converts these back to two dollar signs. This replacement behaviour only exists for dollar symbols so hard-coding this replacement feels like an acceptable workaround that will have the least impact on backwards compatibility.
- Loading branch information
1 parent
18f337d
commit 9a9f896
Showing
4 changed files
with
107 additions
and
0 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
FYI, a tiny neat for maybe next time @sbwsg
exit
in python is for the interactive repl/shell, sys.exit is what is used for non interactive,