From b47caddb3717f66ce3fd58916e389265e6b36dcf Mon Sep 17 00:00:00 2001 From: Devin Pastoor Date: Mon, 26 Sep 2022 09:29:04 -0400 Subject: [PATCH] feat: add opt quarto installer --- internal/config/fs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/config/fs.go b/internal/config/fs.go index c9f9a6b..4a00099 100644 --- a/internal/config/fs.go +++ b/internal/config/fs.go @@ -43,6 +43,11 @@ func GetPathToActiveQuartoExe() string { return filepath.Join(GetPathToActiveBinDir(), quartoExe) } func GetPathToVersionsDir() string { + // if running as root, install to /opt/quarto as an admin helper + if runtime.GOOS == "linux" && os.Getuid() == 0 { + return filepath.Join("opt", "quarto") + } + return filepath.Join(xdg.DataHome, "qvm", "versions") }