Skip to content

Commit 48c9ef9

Browse files
authored
no more await on the shellCommand function
This is because in some instances it hangs which is not wanted
1 parent 75b4bc3 commit 48c9ef9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

slate.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ try{
4242
catch(err){console.error("Failed setting up required ngrok tunnel.. reason being\n~",err); process.exit(0)}
4343

4444
//now to try to open browser with localhost:8082
45-
let stderr=null; let stdout=null
45+
let stderr=null; let stdout=null; setupComplete=true
46+
//in one case the shellCommand function was hanging so no more await
4647
if(process.platform=="win32"){
47-
let x = await shellCommand("start http://localhost:8082"); stdout=x.stdout; stderr=x.stderr
48+
let x = shellCommand("start http://localhost:8082"); stdout=x.stdout; stderr=x.stderr
4849
}
4950
else if(process.platform=="darwin"){
50-
let x = await shellCommand("open http://localhost:8082"); stdout=x.stdout; stderr=x.stderr
51+
let x = shellCommand("open http://localhost:8082"); stdout=x.stdout; stderr=x.stderr
5152
}
5253
else{
53-
let x = await shellCommand("xdg-open http://localhost:8082"); stdout=x.stdout; stderr=x.stderr
54+
let x = shellCommand("xdg-open http://localhost:8082"); stdout=x.stdout; stderr=x.stderr //waiting on this hangs until browser closed
5455
}
55-
setupComplete=true
5656

5757
//if it isn't possible, ask the user to open a browser to localhost:8082
5858
if(stderr){

0 commit comments

Comments
 (0)