Skip to content

How to suppress prepublish hook on yarn install #684

Description

@acarl005

node v6.5.0
yarn v0.15.1

NPM provides some shell environment variables during the installation process. I use one of them to suppress the prepublish hook after npm install, for I find it counterintuitive. Here is an example in a prepublish.sh.

if node -e "process.exit(($npm_config_argv).original[0].indexOf('pu') === 0)"; then
  exit 0;
fi

$npm_config_argv is not present on yarn install, so this throws a SyntaxError. It would be a nice feature if yarn provided something analogous.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions