denoland / deno_task_shell

Cross-platform shell for deno task.
https://crates.io/crates/deno_task_shell
MIT License
109 stars 19 forks source link

Spawning async task and then exiting causes spawned process to not be killed #132

Open dsherret opened 11 hours ago

dsherret commented 11 hours ago

Another case when spawned process not closed when deno task exit

{
  "importMap": "./import_map.json",
  "tasks": {
    "lume": "echo \"import 'lume/task.ts'\" | deno run --unstable --allow-read --allow-run --lock=lock.json -",
    "serve": "deno task lume -s",
    "test": "deno task serve --quiet & PUPPETEER_PRODUCT=chrome deno test --no-check --parallel --shuffle=7 --unstable --allow-env --allow-write --allow-read --allow-net --allow-run ; exit"
  }
}

This is my deno.json config for running e2e test. In this example when I run deno task test, the server is still running although the deno test is done. (notice there is ; exit at the end of line)

_Originally posted by @DrSensor in https://github.com/denoland/deno_task_shell/issues/33#issuecomment-1296022187_

dsherret commented 11 hours ago

@DrSensor I think this issue is fixed? I'm not able to reproduce it