Skip to content

Commit

Permalink
Document use of undocumented runInThisContext flag
Browse files Browse the repository at this point in the history
Accidentally removed in 2d827e7.

Fixes meteor#3200.
  • Loading branch information
glasser committed Dec 5, 2014
1 parent 480d963 commit 76745d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/server/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ Fiber(function () {
var absoluteFilePath = path.resolve(__dirname, fileInfo.path);
var scriptPath =
parsedSourceMaps[absoluteFilePath] ? absoluteFilePath : fileInfo.path;
// The final 'true' is an undocumented argument to runIn[Foo]Context that
// causes it to print out a descriptive error message on parse error. It's
// what require() uses to generate its errors.
var func = require('vm').runInThisContext(wrapped, scriptPath, true);
func.call(global, Npm, Assets); // Coffeescript
});
Expand Down

0 comments on commit 76745d2

Please sign in to comment.