Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix flags are unusable with system-manager cli #46

Open
eclairevoyant opened this issue Oct 12, 2023 · 1 comment
Open

nix flags are unusable with system-manager cli #46

eclairevoyant opened this issue Oct 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@eclairevoyant
Copy link

eclairevoyant commented Oct 12, 2023

Describe the bug

--show-trace or other nix flags don't get passed to nix and error instead

To Reproduce

Steps to reproduce the behavior:

  1. Run sudo system-manager --nix-option --show-trace build --flake .
  2. Error below
error: unexpected argument '--show-trace' found

Usage: system-manager [OPTIONS] <COMMAND>

For more information, try '--help'.

Expected behavior

Pass the flag to nix, as it claims to do.

System information

system-manager 0.1.0

Additional context

Tried both with and without --nix-option.
Additionally, the documentation isn't consistent about where flags go (i.e. before vs after the subcommand), so I assume its position doesn't matter.

Wasn't able to identify the nix build command that's being run based on the source code, if you can provide that, I'll just use that instead.

@eclairevoyant eclairevoyant added the bug Something isn't working label Oct 12, 2023
@r-vdp
Copy link
Member

r-vdp commented Oct 12, 2023

Yeah --nix-option does what --option does for nix. But not everything can be expressed with that, --show-trace being one example of that.

I'd need to check how to pass any extra options to nix directly.

I just pushed a commit so you can set RUST_LOG=debug and see the nix commands being run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants