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

Commit

Permalink
fix(sh): pull in the node override on script exec + stop clearing mod…
Browse files Browse the repository at this point in the history
…ules
  • Loading branch information
zkat committed Nov 9, 2018
1 parent b19ba9c commit 94c59b0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/commands/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async function shell (argv) {
)
} else if (argv._.length > 1) {
const Module = require('module')
require('clear-module').match(/yargs/)
require('../node/index.js')
process.argv = [
process.argv[0],
path.resolve(argv._[1]),
Expand All @@ -77,12 +77,10 @@ async function shell (argv) {
if (err) {
throw err
}
repl.on('exit', function () {
repl.on('exit', () => {
if (repl._flushing) {
repl.pause()
return repl.once('flushHistory', function () {
process.exit()
})
return repl.once('flushHistory', () => process.exit())
}
process.exit()
})
Expand Down

0 comments on commit 94c59b0

Please sign in to comment.