UNPKG

@catladder/pipeline

Version:

Panter workflow for cloud CI/CD and DevOps

13 lines (12 loc) 389 B
/** * * 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 */ export const removeFirstLinesFromCommandOutput = ( cmd: string, removeFirstN: number, ) => (removeFirstN === 0 ? cmd : `${cmd} | tail -n +${removeFirstN + 1}`);