Skip to content

Commit

Permalink
fix validating write permissions on --recover
Browse files Browse the repository at this point in the history
Signed-off-by: roi.kramer <[email protected]>
  • Loading branch information
roi-codefresh committed Mar 19, 2023
1 parent 9f3b0cc commit 6a919c8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ func NewRepoBootstrapCommand() *cobra.Command {
<BIN> repo bootstrap --repo https://github.com/example/repo/path/to/installation_root
`),
PreRun: func(_ *cobra.Command, _ []string) { cloneOpts.Parse() },
PreRun: func(_ *cobra.Command, _ []string) {
cloneOpts.Parse()
if recover {
// in recover mode we don't want to commit anything
cloneOpts.CloneForWrite = false
cloneOpts.CreateIfNotExist = false
}
},
RunE: func(cmd *cobra.Command, args []string) error {
return RunRepoBootstrap(cmd.Context(), &RepoBootstrapOptions{
AppSpecifier: appSpecifier,
Expand Down

0 comments on commit 6a919c8

Please sign in to comment.