Skip to content

Commit 2c2add4

Browse files
committed
fix include context
1 parent 82709fa commit 2c2add4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/av.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ var fs = require('fs');
1616
var vm = require('vm');
1717
var path = require('path');
1818

19-
var context = vm.createContext();
19+
var context = vm.createContext({
20+
console: console,
21+
exports: exports,
22+
module: module,
23+
require: require,
24+
});
2025

2126
var include = function(filename) {
2227
var script = fs.readFileSync(path.join(__dirname, filename), {'encoding': 'utf-8'});

0 commit comments

Comments
 (0)