Skip to content

Commit

Permalink
fix: replace cmd in jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Jan 10, 2025
1 parent 3e3f880 commit 4e78309
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/config/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,17 @@ func mergeJobsSlice(src, dest []interface{}) []interface{} {
destSubJobs = mergeJobsSlice(srcSubJobs, destSubJobs)
}

switch srcRun := srcJob["run"].(type) {
case string:
switch destRun := destJob["run"].(type) {
case string:
newRun := strings.ReplaceAll(srcRun, CMD, destRun)
srcJob["run"] = newRun
default:
}
default:
}

maps.Merge(srcJob, destJob)

if len(destSubJobs) != 0 {
Expand Down

0 comments on commit 4e78309

Please sign in to comment.