File tree 2 files changed +28
-6
lines changed
2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 4
4
# Copyright _copyright_effective_year_ _copyright_holder_name_ <_copyright_holder_contact_>
5
5
# SPDX-License-Identifier: CC-BY-SA-4.0
6
6
7
- set \
8
- -o errexit \
9
- -o errtrace \
7
+ set_opts=(
8
+ # Terminate script execution when an unhandled error occurs
9
+ -o errexit
10
+ -o errtrace
11
+
12
+ # Terminate script execution when an unset parameter variable is
13
+ # referenced
10
14
-o nounset
15
+ )
16
+ if ! set " ${set_opts[@]} " ; then
17
+ printf \
18
+ ' Error: Unable to set the defensive interpreter behavior.\n' \
19
+ 1>&2
20
+ exit 1
21
+ fi
11
22
12
23
required_commands=(
13
24
realpath
Original file line number Diff line number Diff line change 4
4
# Copyright _copyright_effective_year_ _copyright_holder_name_ <_copyright_holder_contact_>
5
5
# SPDX-License-Identifier: CC-BY-SA-4.0
6
6
7
- set \
8
- -o errexit \
9
- -o errtrace \
7
+ set_opts=(
8
+ # Terminate script execution when an unhandled error occurs
9
+ -o errexit
10
+ -o errtrace
11
+
12
+ # Terminate script execution when an unset parameter variable is
13
+ # referenced
10
14
-o nounset
15
+ )
16
+ if ! set " ${set_opts[@]} " ; then
17
+ printf \
18
+ ' Error: Unable to set the defensive interpreter behavior.\n' \
19
+ 1>&2
20
+ exit 1
21
+ fi
You can’t perform that action at this time.
0 commit comments