Skip to content

Commit

Permalink
Default exec command to use IPFS
Browse files Browse the repository at this point in the history
A publisher is required when output folders are specified, otherwise we
will get a validation error (now that generally no publisher is required).
  • Loading branch information
rossjones committed Mar 19, 2024
1 parent ffc2a97 commit 9345964
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/cli/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ func PrepareJob(cmd *cobra.Command, cmdArgs []string, unknownArgs []string, opti
Type: publisherSpec.Type.String(),
Params: publisherSpec.Params,
}
} else {
job.Tasks[0].Publisher = &models.SpecConfig{
Type: "ipfs",
Params: map[string]interface{}{},
}
}

// Handle ResultPaths by using the legacy parser and converting.
Expand Down Expand Up @@ -309,6 +314,10 @@ func prepareJobOutputs(ctx context.Context, options *ExecOptions, job *models.Jo
return err
}

if len(legacyOutputs) == 0 {
return nil
}

job.Tasks[0].ResultPaths = make([]*models.ResultPath, 0, len(legacyOutputs))
for _, output := range legacyOutputs {
rp := &models.ResultPath{
Expand Down

0 comments on commit 9345964

Please sign in to comment.