nox icon indicating copy to clipboard operation
nox copied to clipboard

Detect session.install('pip'....) with `--no-install`

Open 93578237 opened this issue 2 years ago • 2 comments

How would this feature be useful?

I want to use --no-venv and --no-install so I need to rewrite all session.install with session.run('pip'...) but nox does not detect that and runs the installation process.

Describe the solution you'd like

Detect session.install args and check if --no-install arg is provided

Describe alternatives you've considered

No response

Anything else?

No response

93578237 avatar Feb 14 '23 22:02 93578237

You want Nox to error on session.run('pip'...) when --no-install is specified? That's kind of the explicit escape hatch for that, so I'm hesitant to overreach there.

theacodes avatar Jul 12 '23 21:07 theacodes

You can use session.run_always which will be skipped under --no-install.

Despite the (somewhat misleading) name, it's the API to run installation-phase commands that don't implicitly use pip install.

cjolowicz avatar Jul 14 '23 05:07 cjolowicz

This was fixed by renaming run_always.

henryiii avatar Oct 31 '24 05:10 henryiii