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

--help text seems wrong for --dis/enable-nix #8036

Closed
jwaldmann opened this issue Mar 8, 2022 · 3 comments · Fixed by #8054
Closed

--help text seems wrong for --dis/enable-nix #8036

jwaldmann opened this issue Mar 8, 2022 · 3 comments · Fixed by #8054
Labels
cabal-install: nix integration documentation re: help-text Concerning option --help and hints given to the user type: bug

Comments

@jwaldmann
Copy link

cabal --help
...
 --enable-nix                   Enable Nix integration: run commands through
                                nix-shell if a 'shell.nix' file exists
 --disable-nix                  Disable Nix integration: run commands through
                                nix-shell if a 'shell.nix' file exists

in the second line, threre is a negation missing (don't run commands .. even if ..)?

cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.3.0 of the Cabal library 
@Mikolaj
Copy link
Member

Mikolaj commented Mar 8, 2022

Thank you. Indeed, the code just repeats the description of the functionality after the colon, with no negation. It should probably add after the colon "if not disabled, it would...". I wonder if this can be worded in a natural, but precise way.

@jwaldmann
Copy link
Author

jwaldmann commented Mar 8, 2022

my suggestion above was:

don't/never (?) run commands through nix-shell, even if a shell.nix file exists.

is that the correct semantics?

@Mikolaj
Copy link
Member

Mikolaj commented Mar 8, 2022

I was being unclear. The code repeats the same description of the command for both the positive and negative case, only adding a different prefix. I think it's a good idea in general, but it sounds misleading at least in this case.

@fgaz fgaz added cabal-install: nix integration re: help-text Concerning option --help and hints given to the user and removed attention: pr-welcome labels Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal-install: nix integration documentation re: help-text Concerning option --help and hints given to the user type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants