Skip to content

Commit

Permalink
remove --allow-run permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Aug 30, 2024
1 parent b271dc4 commit 4879f30
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (me *Worker) Flags(sandboxPath string) []string {
"--allow-sys",
fmt.Sprintf("--allow-read=.,%s,%s", me.Env["DENO_DIR"], sandboxPath),
"--allow-write=.",
fmt.Sprintf("--allow-run=%s", me.Env["SMALLWEB_EXEC_PATH"]),
}

if configPath := filepath.Join(me.Dir, "deno.json"); utils.FileExists(configPath) {
Expand Down Expand Up @@ -210,13 +209,7 @@ func (me *Worker) LoadEnv() error {
me.Env[pair[0]] = pair[1]
}

executable, err := os.Executable()
if err != nil {
return fmt.Errorf("could not get executable path: %v", err)
}
me.Env["SMALLWEB_EXEC_PATH"] = executable
me.Env["DENO_DIR"] = filepath.Join(os.Getenv("HOME"), ".cache", "smallweb", "deno")

if dotenvPath := filepath.Join(me.Dir, "..", ".env"); utils.FileExists(dotenvPath) {
dotenv, err := godotenv.Read(dotenvPath)
if err != nil {
Expand Down

0 comments on commit 4879f30

Please sign in to comment.