Skip to content

Change panic to warning for console attachment error (fix #2464) - #2468

Merged
AucaCoyan merged 1 commit into
espanso:devfrom
alumik:patch-1
Sep 21, 2025
Merged

AucaCoyan merged 1 commit into
espanso:devfrom
alumik:patch-1

Conversation

@alumik

@alumik alumik commented Sep 21, 2025

Copy link
Copy Markdown
Contributor

This pull request addresses #2464 Cannot start espanso in background on Windows 11.

Previously, espanso/src/main.rs would panic and exit if attach_console() failed (e.g., when started without a terminal window). This caused espanso to silently terminate on Windows 10/11 when launched via Start Menu, startup link, or background service.

Changes

  • Replaced panic on console attach failure with a non-fatal warning.
  • Imported the warn! macro from the logging crate to support this change.

Now, if no console is available, espanso continues execution and logs a warning instead of aborting.

Issue fixed

Closes #2464

@alumik
alumik requested a review from AucaCoyan as a code owner September 21, 2025 03:30
@AucaCoyan
AucaCoyan merged commit caaddea into espanso:dev Sep 21, 2025
@AucaCoyan

AucaCoyan commented Sep 21, 2025 •

Copy link
Copy Markdown
Collaborator

Hey! Thank you so much for submitting a PR and fixing the issue. I started yesterday but couldn't solve it, you got me at the bugfix duel 😆

PD: the CI job that failed is because of another reason, idk why, but nixos for X11 fails with a missing library.

Clint-Eastwood-A-Fistful-of-Dollars-Sergio-3088949476

sboldt1978 pushed a commit to sboldt1978/espanso that referenced this pull request Feb 11, 2026
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.

Cannot start espanso in background on Windows 11

2 participants