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

When running package-changed run in a CI environment, hash is not created #13

Open
TheRealWaldo opened this issue May 11, 2023 · 2 comments

Comments

@TheRealWaldo
Copy link

The hash is never created in an environment with the CI env var set to true:

❯ CI=true npx package-changed run 'npm ci --ignore-scripts'

added 910 packages, and audited 1148 packages in 3m

196 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
❯ ls -al .packagehash
ls: cannot access '.packagehash': No such file or directory

This is undesirable as it causes problems installing hooks and fires multiple times when used in npm 'pre' commands .

Is there a way to force it to create the hash?

@thdk
Copy link
Owner

thdk commented Jul 19, 2023

Package-changed was never meant to run in a CI environment.

See also this from the docs:

Options: --ci Run 'npm ci' instead of 'npm i'. Even when package is not changed. Default when env.CI=true

Can you tell me why you would like to run it as such?

@paraself
Copy link

It's useful when some deps are changed and artifacts are generated based on what deps are used.

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

3 participants