@@ -16,7 +16,6 @@ import (
1616 "os"
1717 "os/exec"
1818 "path/filepath"
19- "runtime"
2019 "strings"
2120 "sync"
2221 "sync/atomic"
@@ -107,7 +106,7 @@ func NewWorker(app app.App, rootDir string, domain string) *Worker {
107106
108107var upgrader = websocket.Upgrader {} // use default options
109108
110- func (me * Worker ) DenoArgs (a app.App , deno string , allowRun ... string ) []string {
109+ func (me * Worker ) DenoArgs (a app.App , deno string ) []string {
111110 args := []string {
112111 "--allow-net" ,
113112 "--allow-import" ,
@@ -128,10 +127,6 @@ func (me *Worker) DenoArgs(a app.App, deno string, allowRun ...string) []string
128127 fmt .Sprintf ("--allow-read=%s,%s,%s" , me .RootDir , sandboxPath , deno ),
129128 fmt .Sprintf ("--allow-write=%s" , me .RootDir ),
130129 )
131- if len (allowRun ) > 0 {
132- args = append (args , fmt .Sprintf ("--allow-run=%s" , strings .Join (allowRun , "," )))
133- }
134-
135130 } else {
136131 root := a .Root ()
137132 // check if root is a symlink
@@ -157,11 +152,6 @@ func (me *Worker) DenoArgs(a app.App, deno string, allowRun ...string) []string
157152 fmt .Sprintf ("--allow-write=%s" , filepath .Join (root , "data" )),
158153 )
159154 }
160-
161- if len (allowRun ) > 0 {
162- args = append (args , fmt .Sprintf ("--allow-run=%s" , strings .Join (allowRun , "," )))
163- }
164-
165155 }
166156
167157 if configPath := filepath .Join (a .Dir , "deno.json" ); utils .FileExists (configPath ) {
@@ -498,11 +488,7 @@ func (me *Worker) Command(ctx context.Context, args ...string) (*exec.Cmd, error
498488 }
499489
500490 denoArgs := []string {"run" }
501- if runtime .GOOS == "darwin" {
502- denoArgs = append (denoArgs , me .DenoArgs (me .App , deno , "open" )... )
503- } else {
504- denoArgs = append (denoArgs , me .DenoArgs (me .App , deno , "xdg-open" )... )
505- }
491+ denoArgs = append (denoArgs , me .DenoArgs (me .App , deno )... )
506492
507493 input := strings.Builder {}
508494 encoder := json .NewEncoder (& input )
0 commit comments