Skip to content

Commit

Permalink
keep both original file and fallback errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ganigeorgiev committed May 28, 2023
1 parent 9a1354a commit 732044f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/ghupdate/ghupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ func (p *plugin) update(withBackup bool) error {
if _, err := os.Stat(newExec); err != nil {
// try again with an .exe extension
newExec = newExec + ".exe"
if _, err := os.Stat(newExec); err != nil {
return fmt.Errorf("The executable in the extracted path is missing or it is inaccessible: %w", err)
if _, fallbackErr := os.Stat(newExec); fallbackErr != nil {
return fmt.Errorf("The executable in the extracted path is missing or it is inaccessible: %w, %w", err, fallbackErr)
}
}

Expand Down

0 comments on commit 732044f

Please sign in to comment.