Skip to content

Commit

Permalink
Fix error when passing --api, --url, --heap, --cpuprofile, --trace, -…
Browse files Browse the repository at this point in the history
…-no-gc flags (#233)
  • Loading branch information
jaredpalmer authored Dec 13, 2021
1 parent 395bac3 commit 6385be8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions cli/cmd/turbo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ func main() {
switch {
case strings.HasPrefix(arg, "--heap="):
heapFile = arg[len("--heap="):]

case strings.HasPrefix(arg, "--trace="):
traceFile = arg[len("--trace="):]

case strings.HasPrefix(arg, "--cpuprofile="):
cpuprofileFile = arg[len("--cpuprofile="):]
default:
Expand Down Expand Up @@ -146,7 +144,7 @@ func main() {
// Don't disable the GC if this is a long-running process
isServe := false
for _, arg := range args {
if arg == "--no-cache" {
if arg == "--no-gc" {
isServe = true
break
}
Expand Down
6 changes: 6 additions & 0 deletions cli/internal/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,12 @@ func parseRunArgs(args []string, cwd string) (*RunOptions, error) {
runOptions.only = true
case strings.HasPrefix(arg, "--team"):
case strings.HasPrefix(arg, "--token"):
case strings.HasPrefix(arg, "--api"):
case strings.HasPrefix(arg, "--url"):
case strings.HasPrefix(arg, "--trace"):
case strings.HasPrefix(arg, "--cpuprofile"):
case strings.HasPrefix(arg, "--heap"):
case strings.HasPrefix(arg, "--no-gc"):
default:
return nil, errors.New(fmt.Sprintf("unknown flag: %v", arg))
}
Expand Down

1 comment on commit 6385be8

@vercel
Copy link

@vercel vercel bot commented on 6385be8 Dec 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.