summaryrefslogtreecommitdiff
path: root/lib/module.js
diff options
context:
space:
mode:
authorKelvin Jin <kelvinjin@google.com>2016-09-30 17:24:03 -0700
committerMatt Loring <mattloring@google.com>2016-11-15 13:54:53 -0800
commitebff29f2fee5390d12b42850fe47dd23af8ef1e8 (patch)
tree18d153e6de8b845404eaee76761a3bf232d7b0da /lib/module.js
parent74f0e51b4df3eccc3bf1f61ab2922b35da6adab1 (diff)
downloadandroid-node-v8-ebff29f2fee5390d12b42850fe47dd23af8ef1e8.tar.gz
android-node-v8-ebff29f2fee5390d12b42850fe47dd23af8ef1e8.tar.bz2
android-node-v8-ebff29f2fee5390d12b42850fe47dd23af8ef1e8.zip
module: check -e flag in debug break setup
When both --debug-brk and --eval are set, and a filename is specified, its full path is not set correctly, causing an error for relative filenames with './' omitted. For example, 'node --debug-brk -e 0 hello.js' throws an error. Since the script referenced by the filename is never run anyway, this change skips resolving its full path if both --debug-brk and --eval are set. PR-URL: https://github.com/nodejs/node/pull/8876 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/module.js')
-rw-r--r--lib/module.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/module.js b/lib/module.js
index bc9d11ee0b..2da3dca35a 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -548,7 +548,7 @@ Module.prototype._compile = function(content, filename) {
displayErrors: true
});
- if (process._debugWaitConnect) {
+ if (process._debugWaitConnect && process._eval == null) {
if (!resolvedArgv) {
// we enter the repl if we're not given a filename argument.
if (process.argv[1]) {