We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 045794c commit cb73a69Copy full SHA for cb73a69
prerequisites/stack.sh
@@ -154,7 +154,7 @@ function stack_pop
154
# Usage: stack_print name
155
#
156
# Modification for use with bash3boilerplate:
157
-# replaced "let _i=${_i}-1" with "(( _i=${_i}-1 ))" to facilitate execution with "set -o nounset"
+# replaced "let _i=${_i}-1" with "(( _i=${_i}-1 )) || true" to support execution with "set -o nounset"
158
159
function stack_print
160
{
@@ -171,10 +171,11 @@ function stack_print
171
172
while (( $_i > 0 ))
173
do
174
- (( _i=${_i}-1 ))
+ (( _i=${_i}-1 )) || true
175
eval 'e=$'"{_stack_$1[$_i]}"
176
tmp="$tmp $e"
177
done
178
+
179
echo "(" $tmp ")"
180
}
181
0 commit comments