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 prepublishOnly script fails, Git operations are not rolled back #728

Open
awmottaz opened this issue Jan 12, 2024 · 0 comments
Open

Comments

@awmottaz
Copy link

Description

I ran np and my prepublishOnly script failed during the npm publish step. np reported that The project was rolled back to its previous state. However, I still have the Git commit and tag from the failed release.

Steps to reproduce

  1. create a prepublishOnly script that will fail
  2. run np

Expected behavior

The Git commit and tag should be rolled back so that I can try again. I saw this was originally implemented in #334 , so this is possibly an uncaught edge case or regression.

Environment

np - 9.2.0
Node.js - 20.10.0
npm - 10.2.5
Git - 2.43.0
OS - MacOS Sonoma 14.2.1

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

1 participant