Add missing os.Chmod step to hub update command (#1093)

This commit is contained in:
Sven van Ginkel
2025-08-27 19:00:03 +02:00
committed by GitHub
parent 621bef30b5
commit 059d2d0a5b

View File

@@ -30,6 +30,14 @@ func Update(_ *cobra.Command, _ []string) {
return return
} }
// make sure the file is executable
exePath, err := os.Executable()
if err == nil {
if err := os.Chmod(exePath, 0755); err != nil {
fmt.Printf("Warning: failed to set executable permissions: %v\n", err)
}
}
// Try to restart the service if it's running // Try to restart the service if it's running
restartService() restartService()
} }