(npm, names)
| 274 | // the mechanism that does work globally: the `--allow-scripts` flag for a |
| 275 | // one-off, or `npm config set allow-scripts` to persist it. |
| 276 | const remediationLines = (npm, names) => { |
| 277 | if (npm.global) { |
| 278 | const list = names.join(',') |
| 279 | return [ |
| 280 | `Run \`npm install -g --allow-scripts=${list}\` to allow these scripts ` + |
| 281 | `once, or \`${configSetAllowScripts(names)}\` to allow them for ` + |
| 282 | 'all global installs.', |
| 283 | ] |
| 284 | } |
| 285 | return [ |
| 286 | 'Run `npm install-scripts ls` to review, ' + |
| 287 | 'or `npm install-scripts approve <pkg>` to allow.', |
| 288 | ] |
| 289 | } |
| 290 | |
| 291 | module.exports = reifyOutput |
no test coverage detected