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

fix: failing script when adding as dependency #85

Merged
merged 2 commits into from
Nov 17, 2022
Merged

Conversation

jfschwarz
Copy link
Collaborator

@jfschwarz jfschwarz commented Nov 17, 2022

The postinstall hook also runs when installing the package as a dependency, which will fail since we trigger solidity compilation etc.

prepare seems to be more suitable:

prepare (since npm@4.0.0)

  • Runs BEFORE the package is packed, i.e. during npm publish and npm pack
  • Runs on local npm install without any arguments
  • Runs AFTER prepublish, but BEFORE prepublishOnly

https://docs.npmjs.com/cli/v8/using-npm/scripts#life-cycle-scripts

postinstall hook also runs when installing the package as a dependency, which will fail. `prepare` seems to be more suitable (see: https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts)
Copy link
Collaborator

@samepant samepant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@samepant samepant merged commit 9346614 into master Nov 17, 2022
@samepant samepant deleted the fix-prepare-hook branch November 17, 2022 16:10
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants