@catladder/pipeline
Version:
Panter workflow for cloud CI/CD and DevOps
18 lines (17 loc) • 601 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.removeFirstLinesFromCommandOutput = void 0;
/**
*
* takes a command and removes the first keep lines from the output
*
* @param cmd the command, its stdout is then limited
* @param removeFirstN how many lines to remove at the start of the command
* @returns
*/
var removeFirstLinesFromCommandOutput = function (cmd, removeFirstN) {
return removeFirstN === 0 ? cmd : "".concat(cmd, " | tail -n +").concat(removeFirstN + 1);
};
exports.removeFirstLinesFromCommandOutput = removeFirstLinesFromCommandOutput;