diff --git a/cmd/joj3/main.go b/cmd/joj3/main.go index 88ef7ec..8e68b62 100644 --- a/cmd/joj3/main.go +++ b/cmd/joj3/main.go @@ -49,7 +49,11 @@ func generateStages(conf Conf) []stage.Stage { var cmds []stage.Cmd for _, optionalCmd := range s.Executor.With.Cases { cmd := s.Executor.With.Default - copier.Copy(&cmd, &optionalCmd) + err := copier.Copy(&cmd, &optionalCmd) + if err != nil { + slog.Error("generate stages", "error", err) + os.Exit(1) + } cmds = append(cmds, cmd) } if len(s.Executor.With.Cases) == 0 { diff --git a/internal/executors/sandbox/convert.go b/internal/executors/sandbox/convert.go index 9798602..b61fe0e 100644 --- a/internal/executors/sandbox/convert.go +++ b/internal/executors/sandbox/convert.go @@ -129,17 +129,6 @@ func convertPBFile(i stage.CmdFile) *pb.Request_File { return nil } -func convertAbsPath(cmdFile *stage.CmdFile) error { - if cmdFile.Src != nil && !filepath.IsAbs(*cmdFile.Src) { - absPath, err := filepath.Abs(*cmdFile.Src) - if err != nil { - return err - } - cmdFile.Src = &absPath - } - return nil -} - func convertPBResult(res []*pb.Response_Result) []stage.ExecutorResult { var ret []stage.ExecutorResult for _, r := range res {