Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
fix(sh): make sure patches are loaded before requiring module
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Nov 9, 2018
1 parent 834ca0d commit d06362b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/commands/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ async function shell (argv) {
if (opts.nodeArg && opts.nodeArg.length) {
cp.spawnSync(
process.argv[0],
['-r', require.resolve('../node/index.js'), ...(opts.nodeArg || []), ...(argv.script ? [argv.script, ...(argv.arguments || [])] : [])],
['-r', require.resolve('../node/index.js'), ...(opts.nodeArg || []), ...argv._.slice(1)],
{ stdio: 'inherit' }
)
} else if (argv._.length > 1) {
const Module = require('module')
require('../node/index.js')
const Module = require('module')
process.argv = [
process.argv[0],
path.resolve(argv._[1]),
Expand Down

0 comments on commit d06362b

Please sign in to comment.