Skip to content

Commit

Permalink
sysuers: fix error if running groupadd with -f
Browse files Browse the repository at this point in the history
According to Colin's pointer, this is to fix the error when running
`rpm-ostree install libvirt` in container,
```
bash# env RPMOSTREE_EXP_BRIDGE_SYSUSERS=1 rpm-ostree install libvirt
...
+ test -v RPMOSTREE_EXP_BRIDGE_SYSUSERS
+ rpm-ostree scriptlet-intercept groupadd -- /sbin/groupadd -f -g 107 -r qemu
error: a value is required for '--force <force>' but none was supplied

For more information, try '--help'.
```
  • Loading branch information
HuijingHei committed Jul 5, 2023
1 parent 1701971 commit a97c457
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rust/src/builtins/scriptlet_intercept/groupadd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ fn cli_cmd() -> Command {
Command::new(name)
.bin_name(name)
.about("create a new group")
.arg(Arg::new("force").short('f').long("force"))
.arg(
Arg::new("force")
.short('f')
.long("force")
.action(ArgAction::SetTrue),
)
.arg(
Arg::new("gid")
.short('g')
Expand Down

0 comments on commit a97c457

Please sign in to comment.