Skip to content

Commit 7e7aa94

Browse files
committed
Add warning if user setup returns an error
1 parent 0ebb8f8 commit 7e7aa94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/envsetup

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ do_build() {
278278
return 0
279279
else
280280
lshout "Building on Termux"
281+
dpkg_depends_on debootstrap
281282
fi
282283
fi
283284

@@ -333,7 +334,6 @@ do_build() {
333334
fi
334335

335336
if [ "$BUILD_PLATFORM" == "termux" ]; then
336-
dpkg_depends_on debootstrap
337337
_debootstrap="$(which debootstrap)"
338338
FOREIGN=""
339339
fi
@@ -425,6 +425,8 @@ do_qemu_user_emulation() {
425425

426426
setup_user() {
427427
shout "Setting up user"
428+
[[ -z $FS_USER ]] && warn "no username provided, skipping user setup.." && return 0
429+
[[ -z $FS_PASS ]] && warn "no password provided, skipping user setup.." && return 0
428430
cp plugins/setup-user.sh $chroot_dir
429431
sed -i s/'$FS_USER'/$FS_USER/g $chroot_dir/setup-user.sh
430432
sed -i s/'$FS_PASS'/$FS_PASS/g $chroot_dir/setup-user.sh

0 commit comments

Comments
 (0)