--cmd is silently ignored unless --enter is also set #1
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
utils/warproot#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The
--cmdflag is meant to specify the command to run inside the chroot, but it only takes effect when--enteris also passed.If a user runs the program with
--cmd="whoami"but without--enter, thecmdStrvalue is silently dropped, and the default command (/bin/sh) or positional args are executed instead.Steps to reproduce
Expected:
idruns inside the chroot.Actual:
/bin/shruns instead;--cmdis ignored with no warning printed or logged.Expected behavior
--cmdshould take effect regardless of--enter, or — if this coupling is intentional — the program should explicitly warn the user that--cmdhas no effect without--enter.Additional notes
The
--enterflag isn't used anywhere else in the code apart from this check — looks like unfinished/leftover logic.