Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
b5490e33
Commit
b5490e33
authored
Dec 14, 2019
by
Matthew Brett
Browse files
errexit_set var to lowercase
Uppercase variable looked more official, and so - to me - was confusing.
parent
2bb607c8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
common_utils.sh
common_utils.sh
+4
-4
No files found.
common_utils.sh
View file @
b5490e33
...
...
@@ -117,14 +117,14 @@ function suppress {
# Set -e stuff agonized over in
# https://unix.stackexchange.com/questions/296526/set-e-in-a-subshell
local tmp=
$(
mktemp
tmp.XXXXXXXXX
)
|| return
local
ERREXIT_SET OUT
local
errexit_set
echo "
Running
$@
"
if [[
$-
= *e* ]]; then
ERREXIT_SET
=true; fi
if [[
$-
= *e* ]]; then
errexit_set
=true; fi
set +e
( if [[ -n
$
ERREXIT_SET
]]; then set -e; fi; "
$@
" > "
$tmp
" 2>&1 ) ; ret=
$?
( if [[ -n
$
errexit_set
]]; then set -e; fi; "
$@
" > "
$tmp
" 2>&1 ) ; ret=
$?
[ "
$ret
" -eq 0 ] || cat "
$tmp
"
rm -f "
$tmp
"
if [[ -n
$
ERREXIT_SET
]]; then set -e; fi
if [[ -n
$
errexit_set
]]; then set -e; fi
return "
$ret
"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment