1
0
Fork 0

Implement process.stdout.isTTY

This commit is contained in:
Alan Plum 2016-11-19 18:41:00 +01:00
parent b2f39e982d
commit 2f07366b8f
No known key found for this signature in database
GPG Key ID: 8ED72A9A323B6EFD
2 changed files with 11 additions and 6 deletions

View File

@ -164,7 +164,6 @@ var initHelp = function () {
if (typeof window === 'undefined') { if (typeof window === 'undefined') {
// We're in arangosh // We're in arangosh
initHelp(); initHelp();
// these variables are not defined in the browser context // these variables are not defined in the browser context
if (!( if (!(
global.IS_EXECUTE_SCRIPT || global.IS_EXECUTE_SCRIPT ||
@ -189,10 +188,12 @@ if (typeof window === 'undefined') {
} }
try { try {
delete global.IS_EXECUTE_SCRIPT; global.process.stdout.isTTY = true;
delete global.IS_EXECUTE_STRING;
delete global.IS_CHECK_SCRIPT;
delete global.IS_UNIT_TESTS;
delete global.IS_JS_LINT;
} catch (e) {} } catch (e) {}
delete global.IS_EXECUTE_SCRIPT;
delete global.IS_EXECUTE_STRING;
delete global.IS_CHECK_SCRIPT;
delete global.IS_UNIT_TESTS;
delete global.IS_JS_LINT;
} }

View File

@ -67,5 +67,9 @@
require('@arangodb').checkAvailableVersions(); require('@arangodb').checkAvailableVersions();
} }
if (internal.options().console) {
global.process.stdout.isTTY = true;
}
return true; return true;
}()); }());