Skip to content

Commit

Permalink
log what's spawned for ci failure
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Mar 29, 2022
1 parent dd47238 commit b52a152
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/commands/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const { resolve } = require('path')
const fs = require('graceful-fs')
const { spawn } = require('child_process')
const cp = require('child_process')
const completion = require('../utils/completion/installed-shallow.js')
const BaseCommand = require('../base-command.js')

Expand Down Expand Up @@ -57,7 +57,8 @@ class Edit extends BaseCommand {
return reject(err)
}
const [bin, ...args] = this.npm.config.get('editor').split(/\s+/)
const editor = spawn(bin, [...args, dir], { stdio: 'inherit' })
console.log(`spawn ${bin}`)
const editor = cp.spawn(bin, [...args, dir], { stdio: 'inherit' })
editor.on('exit', (code) => {
if (code) {
return reject(new Error(`editor process exited with code: ${code}`))
Expand Down

0 comments on commit b52a152

Please # to comment.