devcon-cli 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -601,6 +601,9 @@ async function commandUp(opts) {
601
601
  info("Shutting down...");
602
602
  monitor.stop();
603
603
  portManager.shutdown();
604
+ const pkill = Bun.spawn(["pkill", "-f", `docker exec.*${containerId}`], { stdout: "pipe", stderr: "pipe" });
605
+ await pkill.exited;
606
+ await Bun.sleep(100);
604
607
  info("Stopping container...");
605
608
  const stopProc = Bun.spawn(["docker", "stop", containerId], {
606
609
  stdout: "pipe",
@@ -633,6 +636,11 @@ async function commandDown(opts) {
633
636
  debug("devcon process already exited");
634
637
  }
635
638
  }
639
+ if (state?.containerId) {
640
+ const pkill = Bun.spawn(["pkill", "-f", `docker exec.*${state.containerId}`], { stdout: "pipe", stderr: "pipe" });
641
+ await pkill.exited;
642
+ await Bun.sleep(100);
643
+ }
636
644
  info("Stopping devcontainer...");
637
645
  const proc = Bun.spawn(["devcontainer", "down", "--workspace-folder", workspaceFolder], { stdout: "inherit", stderr: "inherit" });
638
646
  const exitCode = await proc.exited;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devcon-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Devcontainer CLI with automatic port forwarding",
5
5
  "type": "module",
6
6
  "scripts": {