mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-05 12:41:44 -05:00
test(script-runners): fix on Windows
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
"@types/ramda": "^0.27.32",
|
||||
"@zkochan/rimraf": "^1.0.0",
|
||||
"execa": "^4.1.0",
|
||||
"is-windows": "^1.0.2",
|
||||
"mz": "^2.7.0",
|
||||
"write-yaml-file": "^4.1.1"
|
||||
},
|
||||
|
||||
@@ -10,6 +10,7 @@ import prepare, { preparePackages } from '@pnpm/prepare'
|
||||
import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock'
|
||||
import { DEFAULT_OPTS, REGISTRY } from './utils'
|
||||
import execa = require('execa')
|
||||
import isWindows = require('is-windows')
|
||||
import fs = require('mz/fs')
|
||||
import path = require('path')
|
||||
import writeYamlFile = require('write-yaml-file')
|
||||
@@ -389,7 +390,7 @@ test('pnpm run with custom shell', async () => {
|
||||
dir: process.cwd(),
|
||||
extraBinPaths: [],
|
||||
rawConfig: {},
|
||||
scriptShell: path.resolve('node_modules/.bin/shell-mock'),
|
||||
scriptShell: path.resolve(`node_modules/.bin/shell-mock${isWindows() ? '.cmd' : ''}`),
|
||||
}, ['build'])
|
||||
|
||||
expect((await import(path.resolve('shell-input.json'))).default).toStrictEqual(['-c', 'foo bar'])
|
||||
|
||||
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@@ -2013,6 +2013,7 @@ importers:
|
||||
'@types/ramda': 0.27.32
|
||||
'@zkochan/rimraf': 1.0.0
|
||||
execa: 4.1.0
|
||||
is-windows: 1.0.2
|
||||
mz: 2.7.0
|
||||
write-yaml-file: 4.1.1
|
||||
specifiers:
|
||||
@@ -2032,6 +2033,7 @@ importers:
|
||||
'@types/ramda': ^0.27.32
|
||||
'@zkochan/rimraf': ^1.0.0
|
||||
execa: ^4.1.0
|
||||
is-windows: ^1.0.2
|
||||
mz: ^2.7.0
|
||||
p-limit: ^3.1.0
|
||||
path-exists: ^4.0.0
|
||||
|
||||
Reference in New Issue
Block a user