From b0dd33945016dfe87f0970e2c6d85314141df23c Mon Sep 17 00:00:00 2001 From: Tyler Kellen Date: Fri, 29 Aug 2014 16:06:10 -0400 Subject: [PATCH] add support for --ignore-scripts when using npm --- packaging/npm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/npm b/packaging/npm index c5cc7fa5103..b489073e910 100644 --- a/packaging/npm +++ b/packaging/npm @@ -50,6 +50,12 @@ options: - The executable location for npm. - This is useful if you are using a version manager, such as nvm required: false + ignoreScripts: + description: + - Use the --ignore-scripts flag when installing. + required: false + choices: [ "yes", "no" ] + default: no production: description: - Install dependencies in production mode, excluding devDependencies @@ -111,6 +117,7 @@ class Npm(object): self.path = kwargs['path'] self.registry = kwargs['registry'] self.production = kwargs['production'] + self.ignoreScripts = kwargs['ignoreScripts'] if kwargs['executable']: self.executable = kwargs['executable'].split(' ') @@ -130,6 +137,8 @@ class Npm(object): cmd.append('--global') if self.production: cmd.append('--production') + if self.ignoreScripts: + cmd.append('--ignore-scripts') if self.name: cmd.append(self.name_version) if self.registry: