Skip to content

Commit 582b281

Browse files
committed
fix(ci): handle empty args in install script
1 parent 0b199fd commit 582b281

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

public/checksum.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
5d8fdd881b84548f38c1d5ffc6d5f46a18919d8dd6c1398d69abe055dd76ef98 public/sh/install_zpmod.sh
2-
1939c3de9b6812f7e2211d4667d9abbe4d570f43d22d9a9de98ef080b503716a public/sh/install.sh
2+
7408a1045f330a6e73bda55c6c7b48be7873a4e7f1fb00d7db989827cc9224a9 public/sh/install.sh
33
f8519bf7e3e42ad67cc9cff6d82a8367641611fc687b2f6793e26bd55dbbb553 public/sh/sync-init.sh
44
98f54a779985719e390b3e4559b7b0ac22101caac91d0569d41cd9229a05c6de public/zsh/init.zsh

public/sh/install.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ ZPMOD_PROFILE() {
252252
command chmod a+x "${_zpmod_sh}"
253253
fi
254254

255-
exec sh "${_zpmod_sh}" "$@"
255+
if [ "$#" -gt 0 ]; then
256+
exec sh "${_zpmod_sh}" "$@"
257+
fi
258+
exec sh "${_zpmod_sh}"
256259
}
257260

258261
CLOSE_PROFILE() {
@@ -266,7 +269,11 @@ CLOSE_PROFILE() {
266269

267270
MAIN() {
268271
if [ "${AOPT}" = zpmod ]; then
269-
ZPMOD_PROFILE "$@"
272+
if [ "$#" -gt 0 ]; then
273+
ZPMOD_PROFILE "$@"
274+
else
275+
ZPMOD_PROFILE
276+
fi
270277
else
271278
MAIN_PROFILE
272279
ANNEX_PROFILE
@@ -282,4 +289,8 @@ EOF
282289
exit 0
283290
}
284291

285-
MAIN "${@}"
292+
if [ "$#" -gt 0 ]; then
293+
MAIN "$@"
294+
else
295+
MAIN
296+
fi

0 commit comments

Comments
 (0)