Skip to content

Commit f1f3267

Browse files
trim quotes in user setup
1 parent f479e09 commit f1f3267

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugins/envsetup

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ msg() {
6161
}
6262
# lshout () { echo -e "${*}";:; }
6363

64+
trim_quotes() {
65+
# Usage: trim_quotes "string"
66+
: "${1//\'}"
67+
printf '%s\n' "${_//\"}"
68+
}
69+
6470
do_mount() {
6571
local chroot_dir=$1
6672
points="$chroot_dir/dev $chroot_dir/sys $chroot_dir/proc"
@@ -358,7 +364,7 @@ setup_user()
358364

359365
run_cmd "apt update"
360366
install_pkg "openssl"
361-
run_cmd "$CMD"
367+
run_cmd "$(trim_quotes $CMD)"
362368
run_cmd "$pass_set_cmd"
363369

364370
}

0 commit comments

Comments
 (0)