keycloak-themes/default/keycloak/common/resources/node_modules/shx/lib/printCmdRet.js

17 lines
524 B
JavaScript
Raw Normal View History

2024-10-03 21:50:32 +00:00
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
// This function takes the raw result of a shelljs command and figures out how to print it.
// Invoke this *REGARDLESS* of what the command returns, it will figure it out.
var printCmdRet = exports.printCmdRet = function printCmdRet(ret) {
// Don't print these types
if (typeof ret === 'boolean' || !ret) return;
if (typeof ret.stdout === 'string') {
process.stdout.write(ret.stdout);
} else {
process.stdout.write(ret);
}
};