Skip to content

Commit

Permalink
fix: Don't return an error when the user chooses quit from a prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jun 19, 2022
1 parent b554329 commit 755e02f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/addcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (c *Config) defaulReplaceFunc(
case choice == "no":
return chezmoi.Skip
case choice == "quit":
return chezmoi.ExitCodeError(1)
return chezmoi.ExitCodeError(0)
case choice == "yes":
return nil
default:
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,9 @@ func (c *Config) defaultPreApplyFunc(
case choice == "skip":
return chezmoi.Skip
case choice == "quit":
return chezmoi.ExitCodeError(1)
return chezmoi.ExitCodeError(0)
default:
return nil
panic(fmt.Sprintf("%s: unexpected choice", choice))
}
}
}
Expand Down

0 comments on commit 755e02f

Please sign in to comment.