-
-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
These lines don't seem to make sense:
oldpwd="$(pwd)"
...
$_sudo chroot . /usr/bin/env -i su -l "$user" \
sh -c ". /etc/profile; . /env.sh; cd '$oldpwd' 2>/dev/null; \"\$@\"" \
-- "${@:-sh}"
because
- $oldpwd is a host path
- after you chroot, you're in the guest
- then you cd into a host path in the guest, which likely does NOT exist
It is harmless, but it looks like dead code to me. And the error message is supressed with 2>/dev/null.
I have a few more fixes in the fork https://github.com/oils-for-unix/alpine-chroot-install if interested
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels