summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
diff options
context:
space:
mode:
authornpm CLI robot <npm-cli+bot@github.com>2022-07-03 10:33:41 -0700
committerGitHub <noreply@github.com>2022-07-03 18:33:41 +0100
commitc624f5d35e028ba88314830638b42dc734923239 (patch)
treea6b940521a617946d9c8bc1aedff78d5634a9490 /deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
parentdca76e7990c0ac27029e91a6730126e2adadb614 (diff)
downloadnode-new-c624f5d35e028ba88314830638b42dc734923239.tar.gz
deps: upgrade npm to 8.13.2
PR-URL: https://github.com/nodejs/node/pull/43622 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Diffstat (limited to 'deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js')
-rw-r--r--deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js b/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
index 660588e3ee..47f7346301 100644
--- a/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
+++ b/deps/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
@@ -30,6 +30,7 @@ const makeSpawnArgs = options => {
npm_config_node_gyp,
})
+ const fileName = escape.filename(`${event}-${Date.now()}`)
let scriptFile
let script = ''
@@ -61,7 +62,7 @@ const makeSpawnArgs = options => {
const doubleEscape = pathToInitial.endsWith('.cmd') || pathToInitial.endsWith('.bat')
- scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.cmd`)
+ scriptFile = resolve(tmpdir(), `${fileName}.cmd`)
script += '@echo off\n'
script += cmd
if (args.length) {
@@ -71,7 +72,7 @@ const makeSpawnArgs = options => {
const shebang = isAbsolute(scriptShell)
? `#!${scriptShell}`
: `#!/usr/bin/env ${scriptShell}`
- scriptFile = resolve(tmpdir(), `${event}-${Date.now()}.sh`)
+ scriptFile = resolve(tmpdir(), `${fileName}.sh`)
script += `${shebang}\n`
script += cmd
if (args.length) {