Skip to content

Commit 324120f

Browse files
committed
[fix] : Fixed set -eu
1 parent ed98c81 commit 324120f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,10 +1220,8 @@ msg_debug "Use the default configuration file (${defaultconfig})."
12201220
# Debug mode
12211221
if [[ "${bash_debug}" = true ]]; then set -x -v; fi
12221222

1223-
set +eu
1224-
12251223
# Check for a valid channel name
1226-
if [[ -n "${1}" ]]; then
1224+
if [[ -n "${1+SET}" ]]; then
12271225
case "$(bash "${tools_dir}/channel.sh" -n check "${1}")" in
12281226
"incorrect")
12291227
msg_error "Invalid channel ${1}" "1"
@@ -1237,6 +1235,9 @@ if [[ -n "${1}" ]]; then
12371235
channel_name="${1}"
12381236
;;
12391237
esac
1238+
else
1239+
channel_dir="${script_path}/channels/${channel_name}"
1240+
12401241
fi
12411242

12421243
# Set for special channels
@@ -1246,8 +1247,6 @@ if [[ -d "${channel_dir}.add" ]]; then
12461247
elif [[ "${channel_name}" = "clean" ]]; then
12471248
"${tools_dir}/clean.sh" -w "$(realpath "${work_dir}")" $([[ "${debug}" = true ]] && echo -n "-d")
12481249
exit 0
1249-
else
1250-
channel_dir="${script_path}/channels/${channel_name}"
12511250
fi
12521251

12531252
# Check channel version

0 commit comments

Comments
 (0)