1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-03-29 09:00:44 +02:00

keep both original file and fallback errors

This commit is contained in:
Gani Georgiev 2023-05-28 22:00:48 +03:00
parent 9a1354ae62
commit 732044f795

View File

@ -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)
}
}