[BUG] Unexpected behavior with publish dry-run #4398
Labels
Bug
thing that needs fixing
Priority 2
secondary priority issue
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Hi,
npm publish --dry-run
calls the package.json script "prepublishOnly"./prepublish.sh
./prepublish.sh
does the following:./prepublish.sh
fails, not findingtsc
, and actually thenode_modules
directory is missing!So it seems to me that somehow the npm commands run by the
./prepublish.sh
script inherits the "--dry-run" option.Is this the expected behavior?
IMHO it should be not, and older versions did work properly as far as I remember.
Or, at least, there should be an option to not inherit dry-run behavior.
Please note that if I run the
./prepublish.sh
script, it works fine. This behavior happens only when runningnpm publish --dry-run
.Regards
Expected Behavior
npm commands should perform what explicitly told to do.
Or there should be a way to perform the install-and-build check performed by my script.
Steps To Reproduce
Already posted before
Environment
The text was updated successfully, but these errors were encountered: