Skip to content

fix(tray): inject execution-policy flags in shared PS launcher (#142)#184

Merged
massive-value merged 1 commit into
mainfrom
fix/142-ps-execution-policy
Jul 7, 2026
Merged

fix(tray): inject execution-policy flags in shared PS launcher (#142)#184
massive-value merged 1 commit into
mainfrom
fix/142-ps-execution-policy

Conversation

@massive-value

Copy link
Copy Markdown
Owner

Summary

  • The instant-crash part of Frozen tray launches uninstall helper and all toasts with DETACHED_PROCESS + no stdio — PowerShell dies instantly #142 is already fixed (uninstaller/toasts/updater all route through launch_hidden_powershell with CREATE_NO_WINDOW + DEVNULL stdio). The remaining gap: only updater.py also passed -NonInteractive -ExecutionPolicy Bypass, so on a stock machine with the default Restricted execution policy the uninstaller's -File launch and the toast -Command launch could still fail.
  • launch_hidden_powershell (src/plaud_tools/tray/process_launch.py) now injects -NonInteractive -ExecutionPolicy Bypass right after args[0] for every caller, deduped so a caller that already passes them (the updater, historically) doesn't get them twice.
  • Simplified updater.py's _launch_updater to stop passing the flags itself since the shared helper now guarantees them.

Closes #142

Test plan

  • python -m pytest tests/test_process_launch.py tests/test_updater_launch.py -v — added two new tests (test_execution_policy_flags_injected_when_missing, test_execution_policy_flags_not_duplicated) confirming injection + dedupe; all pass
  • python -m pytest -q — full suite, 1026 passed, 2 skipped
  • ruff check / mypy on changed files — clean

🤖 Generated with Claude Code

…S launcher (#142)

launch_hidden_powershell only got safe stdio/CREATE_NO_WINDOW; only the
updater separately passed -NonInteractive -ExecutionPolicy Bypass, so the
uninstaller and toast launches could still fail on a stock machine's
default Restricted execution policy. Inject the flags once in the shared
helper (deduped if a caller already passes them) so every call site is
covered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@massive-value massive-value merged commit 6dfa07d into main Jul 7, 2026
16 checks passed
@massive-value massive-value deleted the fix/142-ps-execution-policy branch July 7, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frozen tray launches uninstall helper and all toasts with DETACHED_PROCESS + no stdio — PowerShell dies instantly

1 participant