diff --git a/@types/bash-parser/index.d.ts b/@types/bash-parser/index.d.ts index c9d64987f..ca13e0706 100644 --- a/@types/bash-parser/index.d.ts +++ b/@types/bash-parser/index.d.ts @@ -57,7 +57,12 @@ declare module '@ericcornelissen/bash-parser' { commandAST: AST; }; - export type Node = CompoundList | Command | LogicalExpression | If | For | Function_; + type Pipeline = { + type: 'Pipeline'; + commands: Command[]; + }; + + export type Node = CompoundList | Command | LogicalExpression | If | For | Function_ | Pipeline; export type AST = { type: 'Script'; diff --git a/src/binaries/bash-parser.ts b/src/binaries/bash-parser.ts index a4c237f50..2498ce87e 100644 --- a/src/binaries/bash-parser.ts +++ b/src/binaries/bash-parser.ts @@ -64,6 +64,8 @@ export const getBinariesFromScript = ( return getBinariesFromNodes(node.do.commands); case 'CompoundList': return getBinariesFromNodes(node.commands); + case 'Pipeline': + return getBinariesFromNodes(node.commands); default: return []; }