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

pnpm deploy modifies lock file and fails in CI env #5071

Closed
TheNoim opened this issue Jul 21, 2022 · 1 comment · Fixed by #5074
Closed

pnpm deploy modifies lock file and fails in CI env #5071

TheNoim opened this issue Jul 21, 2022 · 1 comment · Fixed by #5074
Assignees
Milestone

Comments

@TheNoim
Copy link

TheNoim commented Jul 21, 2022

Hey, I think this wasn't thought through:
https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-deploy/src/deploy.ts#L101

This will actually modify the workspace lock file, which will cause a failure in an CI env, due to the default behavior of the frozen lock file. Even without a frozen lock file, I believe that the deploy command should not change the workspace lock file. Or at least reset it to its original state once the deployment command is complete. Or am I wrong?

pnpm version: 7.5.2

Code to reproduce the issue:

This will work in any workspace linking a package with another one with workspace:*.

https://github.com/TheNoim/pnpm-deploy-bug-2

Expected behavior:

I expect that I can use the deploy command in a CI environment.

Actual behavior:

The deploy command tries to alter the lock file and fails due to CI constraints.

Additional information:

  • node -v prints: v16.15.1
  • Windows, macOS, or Linux?: macOS 12.4 (21F79) on Apple Silicon
@TheNoim TheNoim changed the title pnpm deploy modifies lock file and fails in pnpm deploy modifies lock file and fails in CI env Jul 21, 2022
@zkochan zkochan self-assigned this Jul 21, 2022
@TheNoim
Copy link
Author

TheNoim commented Jul 21, 2022

Well, this was quick. Thank you <3

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

Successfully merging a pull request may close this issue.

2 participants