mirror of
https://github.com/fankes/beszel.git
synced 2025-10-18 17:29:28 +08:00
Add missing os.Chmod step to hub update command (#1093)
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user