Skip to content

Commit

Permalink
fix: Propagate signal (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvgijssel authored May 22, 2024
1 parent 1147814 commit 5d41466
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/rules_task-serious-bugs-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rules_task": patch
---

fix: Propagate signal
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.7.0
uses: jetpack-io/devbox-install-action@v0.11.0
with:
enable-cache: "true"
- name: Run linters
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"devbox.autoShellOnTerminal": true,
"nix.enableLanguageServer": false,
"files.exclude": {
"**/bazel-*": true
"**/bazel-*": true,
"haos/custom_components/hacs/**/*": true
}
}
12 changes: 1 addition & 11 deletions rules/rules_task/task/private/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,7 @@ def main(instructions) -> None:

cmd = ["bash", "-c", bash_cmd]

try:
process = subprocess.Popen(
cmd,
env=cmd_env,
)
process.wait()
except KeyboardInterrupt:
process.send_signal(signal.SIGINT)
process.wait()

sys.exit(process.returncode)
os.execlpe(cmd[0], *cmd, cmd_env)


if __name__ == "__main__":
Expand Down

0 comments on commit 5d41466

Please sign in to comment.