fix: pnpm permissions in dev mode (#3386)

* fix: pnpm permissions

* Update cmd_bootstrap.go

Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
pull/3397/head
Manuel Nuñez 2022-05-18 00:12:39 -03:00 committed by GitHub
parent 0ee779250c
commit 3a8fdb3be4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -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()