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

--with-test ignored when --no-test also specified #209

Open
theory opened this issue Oct 17, 2021 · 2 comments
Open

--with-test ignored when --no-test also specified #209

theory opened this issue Oct 17, 2021 · 2 comments

Comments

@theory
Copy link

theory commented Oct 17, 2021

I would expect that --with-test would cause cpm to install test/requires modules even with --no-test specified, but alas it does not. Seems like --no-test doesn't just mean "don't run tests" but also "don't install test modules". For example, this will not install Sqitch's test modules:

cpm install --no-test --with-test App::Sqitch

Why would I want to do this? So that I can then have all the dependencies to run tests. Currently working around this issue by downloading the cpanfile, where this does work as expected:

cpm install --no-test --with-test --cpanfile cpanfile
@skaji
Copy link
Owner

skaji commented Oct 17, 2021

As described in help message, --with-* options specify types/phases of dependencies in * cpanfile * to be installed.
So this is an expected behavior.

❯ cpm --help
...
        --with-requires,   --without-requires   (default: with)
        --with-recommends, --without-recommends (default: without)
        --with-suggests,   --without-suggests   (default: without)
        --with-configure,  --without-configure  (default: without)
        --with-build,      --without-build      (default: with)
        --with-test,       --without-test       (default: with)
        --with-runtime,    --without-runtime    (default: with)
        --with-develop,    --without-develop    (default: without)
          specify types/phases of dependencies in cpanfile to be installed

@theory
Copy link
Author

theory commented Oct 17, 2021

Ah, right, of course. Means I can't do this pattern without a cpanfile tho. Which is fine, just need to better tame my cpanfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants