Skip to content

Fix "kdotool missing or not available" on macOS (#2509) - #2514

Merged
AucaCoyan merged 4 commits into
espanso:devfrom
gcailly:fix-kdotool-macos-2509
Oct 6, 2025
Merged

AucaCoyan merged 4 commits into
espanso:devfrom
gcailly:fix-kdotool-macos-2509

Conversation

@gcailly

@gcailly gcailly commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

The kdotool availability check was running unconditionally on all platforms, but kdotool is a Linux-specific tool. This PR adds a #[cfg(target_os = "linux")] attribute to restrict the check to Linux only.

🚨 I did not test this because I am on Windows.

Fixes #2509

…panso#2483)

When running commands like `espanso service --help` or `espanso package --help`,
the CLI was displaying the main application help instead of the specific
subcommand help.

This was caused by using `clap_instance.print_help()` which always prints
the root command help, instead of using `err.exit()` which properly handles
contextual help for subcommands.

Fix: Use `err.exit()` to let Clap handle contextual help display.

Fixes espanso#2483
The kdotool availability check was running on all platforms, including
macOS and Windows, causing a misleading "kdotool missing or not available
for the current wayland DE" log message on non-Linux systems.

kdotool is a Linux/Wayland-specific tool, so the check should only run
on Linux.

This commit adds a #[cfg(target_os = "linux")] attribute to restrict
the kdotool check to Linux platforms only.

Fixes espanso#2509
@gcailly
gcailly requested a review from AucaCoyan as a code owner October 6, 2025 11:53
Only import process::Command on Linux where kdotool check is performed
@gcailly
gcailly force-pushed the fix-kdotool-macos-2509 branch from be5f7a6 to d676677 Compare October 6, 2025 13:15
@AucaCoyan

Copy link
Copy Markdown
Collaborator

Yup, this is correct

@AucaCoyan
AucaCoyan merged commit d424d83 into espanso:dev Oct 6, 2025
sboldt1978 pushed a commit to sboldt1978/espanso that referenced this pull request Feb 11, 2026
…so#2514)

Fix kdotool check running on non-Linux platforms (espanso#2509)

The kdotool availability check was running on all platforms, including
macOS and Windows, causing a misleading "kdotool missing or not available
for the current wayland DE" log message on non-Linux systems.

kdotool is a Linux/Wayland-specific tool, so the check should only run
on Linux.

This commit adds a #[cfg(target_os = "linux")] attribute to restrict
the kdotool check to Linux platforms only.

Fixes espanso#2509

* Fix unused import on macOS and Windows

Only import process::Command on Linux where kdotool check is performed
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.

"kdotool missing or not available" on macOS

2 participants