Skip to content

Commit

Permalink
Safe delete rillcloud file
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaHegde committed Jun 27, 2024
1 parent ee40218 commit 93f85c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion cli/pkg/dotrillcloud/dotrillcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ func Delete(localProjectPath, adminURL string) error {
return err
}

return os.Remove(confPath)
err = os.Remove(confPath)
if err != nil {
if os.IsNotExist(err) {
return nil
}
return err
}
return nil
}

func getConfPath(localProjectPath, adminURL string) (string, error) {
Expand Down
4 changes: 2 additions & 2 deletions cli/pkg/local/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ func (s *Server) DeployProject(ctx context.Context, r *connect.Request[localv1.D
Description: "Auto created by Rill",
Provisioner: "",
ProdVersion: "",
ProdOlapDriver: "",
ProdOlapDriver: "duckdb",
ProdOlapDsn: "",
ProdSlots: 2,
Public: false,
Expand Down Expand Up @@ -501,7 +501,7 @@ func (s *Server) DeployProject(ctx context.Context, r *connect.Request[localv1.D
Description: "Auto created by Rill",
Provisioner: "",
ProdVersion: "",
ProdOlapDriver: "",
ProdOlapDriver: "duckdb",
ProdOlapDsn: "",
ProdSlots: 2,
Public: false,
Expand Down

0 comments on commit 93f85c5

Please sign in to comment.