-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: emissary detects tty and wraps command in pseudo terminal
Signed-off-by: Dana Pieluszczak <[email protected]>
- Loading branch information
Showing
5 changed files
with
134 additions
and
24 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,35 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: tty- | ||
spec: | ||
entrypoint: entrypoint | ||
templates: | ||
- name: entrypoint | ||
steps: | ||
- - name: tty-true | ||
template: tty-true | ||
- name: tty-false | ||
template: tty-false | ||
|
||
- name: tty-true | ||
script: | ||
tty: true | ||
stdin: true | ||
image: alpine:latest | ||
command: [sh] | ||
source: | | ||
if [[ ! -t 0 ]]; then | ||
echo "I should be in a terminal but I'm not" | ||
exit 1 | ||
fi | ||
- name: tty-false | ||
script: | ||
image: alpine:latest | ||
command: [sh] | ||
source: | | ||
if [[ -t 0 ]]; then | ||
echo "I should not be in a terminal but I am" | ||
exit 1 | ||
fi |
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