Skip to content

Commit 1f5382d

Browse files
lukekarryswraithgar
authored andcommitted
fix: don't set stdioString for any spawn/run-script calls
These libraries now return strings by default which is what we always want in the CLI for error reporting. Fixes #5766
1 parent abfb28b commit 1f5382d

File tree

14 files changed

+9
-40
lines changed

14 files changed

+9
-40
lines changed

lib/commands/ci.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ class CI extends ArboristWorkspaceCmd {
9494
args: [],
9595
scriptShell,
9696
stdio: 'inherit',
97-
stdioString: true,
9897
banner: !this.npm.silent,
9998
event,
10099
})

lib/commands/explore.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class Explore extends BaseCommand {
5959
pkg,
6060
banner: false,
6161
path,
62-
stdioString: true,
6362
event: '_explore',
6463
stdio: 'inherit',
6564
}).catch(er => {

lib/commands/install.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ class Install extends ArboristWorkspaceCmd {
161161
args: [],
162162
scriptShell,
163163
stdio: 'inherit',
164-
stdioString: true,
165164
banner: !this.npm.silent,
166165
event,
167166
})

lib/commands/run-script.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ class RunScript extends BaseCommand {
117117
args,
118118
scriptShell,
119119
stdio: 'inherit',
120-
stdioString: true,
121120
pkg,
122121
banner: !this.npm.silent,
123122
}

scripts/util.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ const spawn = async (cmd, ...allArgs) => {
5555
let res = null
5656
try {
5757
const spawnOpts = {
58-
stdioString: true,
5958
stdio: quiet || out || lines ? 'pipe' : 'inherit',
6059
cwd: CWD,
6160
...opts,

smoke-tests/test/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ const exec = async (...args) => {
9595
PATH: `${PATH}:${binLocation}`,
9696
COMSPEC: process.env.COMSPEC,
9797
},
98-
stdioString: true,
9998
encoding: 'utf-8',
10099
})
101100

test/bin/windows-shims.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ for (const [name, bash] of bashes) {
100100
const result = await spawn(bash, args, {
101101
env: { PATH: path, npm_config_update_notifier: 'false' },
102102
cwd: path,
103-
stdioString: true,
104103
})
105104
t.match(result, {
106105
cmd: bash,
@@ -119,7 +118,6 @@ for (const [name, bash] of bashes) {
119118
const result = await spawn(bash, args, {
120119
env: { PATH: path, npm_config_update_notifier: 'false' },
121120
cwd: path,
122-
stdioString: true,
123121
})
124122
t.match(result, {
125123
cmd: bash,

test/lib/commands/run-script.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ t.test('default env, start, and restart scripts', t => {
125125
args: [],
126126
scriptShell: undefined,
127127
stdio: 'inherit',
128-
stdioString: true,
129128
pkg: { name: 'x', version: '1.2.3', _id: '[email protected]', scripts: {} },
130129
event: 'start',
131130
},
@@ -140,7 +139,6 @@ t.test('default env, start, and restart scripts', t => {
140139
args: [],
141140
scriptShell: undefined,
142141
stdio: 'inherit',
143-
stdioString: true,
144142
pkg: {
145143
name: 'x',
146144
version: '1.2.3',
@@ -162,7 +160,6 @@ t.test('default env, start, and restart scripts', t => {
162160
args: [],
163161
scriptShell: undefined,
164162
stdio: 'inherit',
165-
stdioString: true,
166163
pkg: {
167164
name: 'x',
168165
version: '1.2.3',
@@ -185,7 +182,6 @@ t.test('default env, start, and restart scripts', t => {
185182
args: [],
186183
scriptShell: undefined,
187184
stdio: 'inherit',
188-
stdioString: true,
189185
pkg: {
190186
name: 'x',
191187
version: '1.2.3',
@@ -220,7 +216,6 @@ t.test('non-default env script', t => {
220216
args: [],
221217
scriptShell: undefined,
222218
stdio: 'inherit',
223-
stdioString: true,
224219
pkg: {
225220
name: 'x',
226221
version: '1.2.3',
@@ -242,7 +237,6 @@ t.test('non-default env script', t => {
242237
args: [],
243238
scriptShell: undefined,
244239
stdio: 'inherit',
245-
stdioString: true,
246240
pkg: {
247241
name: 'x',
248242
version: '1.2.3',
@@ -305,7 +299,6 @@ t.test('run pre/post hooks', async t => {
305299
args: [],
306300
scriptShell: undefined,
307301
stdio: 'inherit',
308-
stdioString: true,
309302
pkg: {
310303
name: 'x',
311304
version: '1.2.3',
@@ -342,7 +335,6 @@ t.test('skip pre/post hooks when using ignoreScripts', async t => {
342335
args: [],
343336
scriptShell: undefined,
344337
stdio: 'inherit',
345-
stdioString: true,
346338
pkg: {
347339
name: 'x',
348340
version: '1.2.3',
@@ -385,7 +377,6 @@ t.test('run silent', async t => {
385377
args: [],
386378
scriptShell: undefined,
387379
stdio: 'inherit',
388-
stdioString: true,
389380
pkg: {
390381
name: 'x',
391382
version: '1.2.3',

workspaces/arborist/lib/arborist/rebuild.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ module.exports = cls => class Builder extends cls {
345345
event,
346346
path,
347347
pkg,
348-
stdioString: true,
349348
stdio,
350349
env,
351350
scriptShell: this[_scriptShell],

workspaces/arborist/lib/arborist/reify.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,6 @@ module.exports = cls => class Reifier extends cls {
15581558
event,
15591559
path,
15601560
pkg,
1561-
stdioString: true,
15621561
stdio,
15631562
scriptShell: this.options.scriptShell,
15641563
})

0 commit comments

Comments
 (0)