add pipefails

Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
Jess Frazelle
2017-04-27 16:58:43 -04:00
parent 0a1485f754
commit 329b27eeeb
11 changed files with 22 additions and 2 deletions

View File

@@ -1,4 +1,11 @@
#!/bin/bash
set -e
set -o pipefail
su user -c /usr/bin/editor
VSCODE_COMMAND=/usr/bin/code
if [[ ! -f "${VSCODE_COMMAND}" ]]; then
>&2 echo "${VSCODE_COMMAND} does not exist"
exit 1
fi
su user -c "${VSCODE_COMMAND}"
sleep infinity