Skip to content

Commit

Permalink
feat(cli): remove jobname requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Feb 5, 2024
1 parent 8455435 commit e49f8ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cli/cmd/submit/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import (
"math/big"
"os"
"os/signal"
"path/filepath"
"regexp"
"strings"
"syscall"
Expand Down Expand Up @@ -205,8 +206,7 @@ var flags = []cli.Flag{
},
&cli.StringFlag{
Name: "job-name",
Usage: "The job name.",
Required: true,
Usage: "The job name. (If empty, defaults to the job file name.)",
Destination: &jobName,
Category: "Submit Settings:",
},
Expand Down Expand Up @@ -290,6 +290,9 @@ var Command = cli.Command{
return errors.New("missing --credits or --credits-wei parameter")
}
jobPath := cCtx.Args().First()
if jobName == "" {
jobName = filepath.Base(strings.TrimSuffix(jobPath, filepath.Ext(jobPath)))
}
ctx := cCtx.Context
pk, err := utils.GetPrivateKey(ethHexPK, ethHexPKPath)
if err != nil {
Expand Down

0 comments on commit e49f8ea

Please sign in to comment.