-
Notifications
You must be signed in to change notification settings - Fork 0
Utils.Function.join_commands
DecentM edited this page Jan 16, 2026
·
86 revisions
@decentm/concourse-ts / Utils / join_commands
join_commands(
customise, ...commands):Command
Defined in: utils/commands/index.ts:31
Joins multiple commands into a single command, by a provided joiner. Any "user" and "dir" properties will be taken from the first command that has them, and applied to the result. You must set these properties in the customiser explicitly if you want to avoid this behaviour.
Example:
const final_command = join_commands((args, command) => {
command.path = '/bin/sh'
command.add_args('-exuc')
command.add_args(args.join(' && '))
}, command_a, command_b)This will create a new command that runs command_a and command_b in
sequence, separated by && to run them sequentially.
(instance, parent) => void
Customiser to apply to the resulting command
...Command[]
Commands to join