diff --git a/.changeset/rules_task-serious-bugs-own.md b/.changeset/rules_task-serious-bugs-own.md new file mode 100644 index 000000000..b8fc967e0 --- /dev/null +++ b/.changeset/rules_task-serious-bugs-own.md @@ -0,0 +1,5 @@ +--- +"rules_task": patch +--- + +fix: Propagate signal diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91dc8392f..298f9dabe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/.vscode/settings.json b/.vscode/settings.json index b22afdf73..0ef7f06bb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,6 +19,7 @@ "devbox.autoShellOnTerminal": true, "nix.enableLanguageServer": false, "files.exclude": { - "**/bazel-*": true + "**/bazel-*": true, + "haos/custom_components/hacs/**/*": true } } diff --git a/rules/rules_task/task/private/runner.py b/rules/rules_task/task/private/runner.py index 1a5fbcd23..20f5814e9 100644 --- a/rules/rules_task/task/private/runner.py +++ b/rules/rules_task/task/private/runner.py @@ -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__":