Skip to content

Commit

Permalink
Merge pull request #127 from novalagung/fix/cache-reset
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie authored May 24, 2023
2 parents fd02281 + 5201051 commit bdb8adf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cmd/cache/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ func NewCmdResetCache() *cobra.Command {
Short: "Reset the cache for a project",
Args: cli.RequiresMaxArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
cwd, _ := filepath.Abs(args[0])
projectID := helpers.ResolveProjectID(projectID, cwd)
if projectID == "" {
return errors.Errorf("unknown project ID (run `depot init` or use --project or $DEPOT_PROJECT_ID)")
var cwd string
if len(args) > 0 {
cwd, _ = filepath.Abs(args[0])
}
projectID := helpers.ResolveProjectID(projectID, cwd)
if projectID == "" {
return errors.Errorf("unknown project ID (run `depot init` or use --project or $DEPOT_PROJECT_ID)")
}
Expand Down

0 comments on commit bdb8adf

Please sign in to comment.