mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-24 10:01:48 -04:00
When a command is passed through to npm, return the status code that was returned by it. Close #402
14 lines
371 B
TypeScript
14 lines
371 B
TypeScript
import path = require('path')
|
|
import test = require('tape')
|
|
import spawn = require('cross-spawn')
|
|
|
|
const pnpmBin = path.join(__dirname, '../src/bin/pnpm.ts')
|
|
|
|
test('return error status code when underlying command fails', t => {
|
|
const result = spawn.sync('ts-node', [pnpmBin, 'invalid-command'])
|
|
|
|
t.equal(result.status, 1, 'error status code returned')
|
|
|
|
t.end()
|
|
})
|