From 3a8fdb3be405d3dd04c29595940a563d6e7645de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Nu=C3=B1ez?= <10672208+mind-ar@users.noreply.github.com> Date: Wed, 18 May 2022 00:12:39 -0300 Subject: [PATCH] fix: pnpm permissions in dev mode (#3386) * fix: pnpm permissions * Update cmd_bootstrap.go Co-authored-by: Amir Zarrinkafsh --- cmd/authelia-scripts/cmd_bootstrap.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmd/authelia-scripts/cmd_bootstrap.go b/cmd/authelia-scripts/cmd_bootstrap.go index a7dbcb4d..627a5b50 100644 --- a/cmd/authelia-scripts/cmd_bootstrap.go +++ b/cmd/authelia-scripts/cmd_bootstrap.go @@ -100,6 +100,18 @@ func createTemporaryDirectory() { } } +func createPNPMDirectory() { + home := os.Getenv("HOME") + if home != "" { + bootstrapPrintln("Creating ", home+"/.pnpm-store") + err := os.MkdirAll(home+"/.pnpm-store", 0755) + + if err != nil { + panic(err) + } + } +} + func bootstrapPrintln(args ...interface{}) { a := make([]interface{}, 0) a = append(a, "[BOOTSTRAP]") @@ -230,6 +242,7 @@ func Bootstrap(cobraCmd *cobra.Command, args []string) { } createTemporaryDirectory() + createPNPMDirectory() bootstrapPrintln("Preparing /etc/hosts to serve subdomains of example.com...") prepareHostsFile()