You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commands should be separated with the && operator. Currently, the commands execute sequentially but every return status up to that of the webpack invocation is swallowed.
npm run release also demonstrates the issue.
EDIT: I was mistaken with regards to why semicolons were used. In case it's not apparent, semicolons seem to be used for the exact purpose of circumventing a prior command failing. Specifically, a script may enter a directory, issue a command with a relative likeliness to fail in some way, and exit the directory regardless of the previous command's return status.
The scripts written with the semicolon pattern are still likely to cause issues if a failure return status is returned mid-script. For example, npm run publish, specifically, will always appear to succeed even if its invocation of npm publish has not. Workflow results from GitHub Actions would always imply the script ran correctly, etc.
While replacing each semicolon with a corresponding && will fix the problem of commands appearing as if they've succeeded when they haven't, it will break the last directory traversal of any scripts in which an error causes an early failure. A full solution would be to replace the directory traversal pattern used in the scripts with the conventional inclusion/exclusion file rules for building and package deployment, etc.
rum/package.json
Line 13 in f0a55ba
Commands should be separated with the
&&
operator. Currently, the commands execute sequentially but every return status up to that of thewebpack
invocation is swallowed.npm run release
also demonstrates the issue.EDIT: I was mistaken with regards to why semicolons were used. In case it's not apparent, semicolons seem to be used for the exact purpose of circumventing a prior command failing. Specifically, a script may enter a directory, issue a command with a relative likeliness to fail in some way, and exit the directory regardless of the previous command's return status.
The scripts written with the semicolon pattern are still likely to cause issues if a failure return status is returned mid-script. For example,
npm run publish
, specifically, will always appear to succeed even if its invocation ofnpm publish
has not. Workflow results from GitHub Actions would always imply the script ran correctly, etc.While replacing each semicolon with a corresponding
&&
will fix the problem of commands appearing as if they've succeeded when they haven't, it will break the last directory traversal of any scripts in which an error causes an early failure. A full solution would be to replace the directory traversal pattern used in the scripts with the conventional inclusion/exclusion file rules for building and package deployment, etc.The short npm developer guide contains a bit of information on the subject.
The text was updated successfully, but these errors were encountered: