From 059d2d0a5bc83bcb623d00d4070dbb9e8010a818 Mon Sep 17 00:00:00 2001 From: Sven van Ginkel Date: Wed, 27 Aug 2025 19:00:03 +0200 Subject: [PATCH] Add missing os.Chmod step to hub update command (#1093) --- beszel/internal/hub/update.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beszel/internal/hub/update.go b/beszel/internal/hub/update.go index 28f6ca9..246f579 100644 --- a/beszel/internal/hub/update.go +++ b/beszel/internal/hub/update.go @@ -30,6 +30,14 @@ func Update(_ *cobra.Command, _ []string) { 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 restartService() }