Skip to content

Commit

Permalink
Merge pull request #3021 from bomoko/feature/custom_task_arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood authored Feb 11, 2022
2 parents 09acaff + 3bec832 commit f955bd1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions services/api/src/resources/task/task_definition_resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,18 @@ export const invokeRegisteredTask = async (

let taskCommandEnvs = '';

if(argumentValues) {
let taskCommand = "";

if(argumentValues && argumentValues.length > 0) {
taskCommandEnvs = R.reduce((acc, val) => {
//@ts-ignore
return `${acc} ${val.advancedTaskDefinitionArgumentName}="${val.value}"`
}, taskCommandEnvs, argumentValues);
}

taskCommand += `${taskCommandEnvs}; `;
}

let taskCommand = `${taskCommandEnvs}; ${task.command}`;
taskCommand += `${task.command}`;

const taskData = await Helpers(sqlClientPool).addTask({
name: task.name,
Expand Down

0 comments on commit f955bd1

Please sign in to comment.