Skip to content

Commit 818cd57

Browse files
committed
changes util.format to use require
some versions of node seem to not have a global util in an eval context. changes `util.format` to `require("util").format` to address this issue.
1 parent ea18e27 commit 818cd57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cwltool/cwlNodeEngineJSConsole.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"use strict";
22
function js_console_log(){
3-
console.error("[log] "+util.format.apply(this, arguments).split("\n").join("\n[log] "));
3+
console.error("[log] "+require("util").format.apply(this, arguments).split("\n").join("\n[log] "));
44
}
55
function js_console_err(){
6-
console.error("[err] "+util.format.apply(this, arguments).split("\n").join("\n[err] "));
6+
console.error("[err] "+require("util").format.apply(this, arguments).split("\n").join("\n[err] "));
77
}
88
process.stdin.setEncoding("utf8");
99
var incoming = "";

0 commit comments

Comments
 (0)