Skip to content

Commit

Permalink
fix: support prune without turbo.json (#3785)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski authored Feb 27, 2023
1 parent ff0d5ec commit 6535d63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/internal/prune/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package prune
import (
"bufio"
"fmt"
"os"
"strings"

"github.com/vercel/turbo/cli/internal/cmdutil"
Expand Down Expand Up @@ -209,7 +210,7 @@ func (p *prune) prune(opts *turbostate.PrunePayload) error {
}

turboJSON, err := fs.LoadTurboConfig(p.base.RepoRoot, rootPackageJSON, false)
if err != nil {
if err != nil && !errors.Is(err, os.ErrNotExist) {
return errors.Wrap(err, "failed to read turbo.json")
}
if turboJSON != nil {
Expand Down

0 comments on commit 6535d63

Please sign in to comment.