From dbf23f1a41a77403ee679a4287c3bdaa63cca11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 4 Aug 2025 15:39:55 +0200 Subject: [PATCH] Manager: allow absolute manager-local storage path When an absolute path is used for the manager-local storage, use it as-is. Before this, it would always be taken as relative to the manager executable. --- internal/manager/local_storage/local_storage.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/manager/local_storage/local_storage.go b/internal/manager/local_storage/local_storage.go index 5ec3c5b5..11386166 100644 --- a/internal/manager/local_storage/local_storage.go +++ b/internal/manager/local_storage/local_storage.go @@ -20,7 +20,14 @@ type StorageInfo struct { // NewNextToExe returns a storage representation that sits next to the // currently-running executable. If that directory cannot be determined, falls // back to the current working directory. +// If `subdir` is an absolute path, it is used as-is. func NewNextToExe(subdir string) StorageInfo { + if filepath.IsAbs(subdir) { + return StorageInfo{ + rootPath: subdir, + } + } + exeDir := getSuitableStorageRoot() storagePath := filepath.Join(exeDir, subdir)