diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-03-11 15:34:55 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-03-11 15:34:55 -1000 |
commit | bf2555a2efdf6055309402b92288818fdbabea3e (patch) | |
tree | 1ce502fa2d1c44d93d529949f40b48cfac2cabad /lib | |
parent | 7af18601396fa8fd08dc94fa25166780e3757a7b (diff) | |
download | patchfoo-bf2555a2efdf6055309402b92288818fdbabea3e.tar.gz patchfoo-bf2555a2efdf6055309402b92288818fdbabea3e.zip |
script: catch resolve error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1407,7 +1407,9 @@ App.prototype.getScript = function (filepath, cb) { var self = this fs.stat(filename, function (err, stat) { if (err) return cb(err) - var resolved = require.resolve(filename) + var resolved + try { resolved = require.resolve(filename) } + catch(e) { return cb(e) } var prevMtime = self.mtimes[resolved] var mtime = stat.mtime.getTime() if (mtime !== prevMtime) { |