keycloak-themes/default/keycloak/common/resources/node_modules/shx/lib/printCmdRet.js
2024-10-03 15:50:32 -06:00

17 lines
No EOL
524 B
JavaScript

'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);
}
};