Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash dispatching desktop notifications in Linux environments without GUI #32

Open
2 tasks
lelandjansen opened this issue Apr 29, 2019 · 0 comments
Open
2 tasks
Assignees
Labels
bug Something isn't working

Comments

@lelandjansen
Copy link
Owner

The CLI crashes with a stack overflow when trying to dispatch desktop notifications in Linux environments without a GUI (e.g. in CI).

Introduced in #24.

# cargo run -- echo hello
    Finished dev [unoptimized + debuginfo] target(s) in 0.38s
     Running `target/debug/diditrun echo hello`
hello

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

To get around this (temporarily,) we use a dummy DesktopNotifier for Linux tests.

Things that need to get fixed:

  • Do not crash (at least return a Result and print an error).
  • Detect that we are not running in a GUI environment and fail early with an error (e.g. "cannot display desktop notifications in a non-GUI environment"). The user should explicitly pass the --no-desktop flag or override the error with the --no-validate flag.
@lelandjansen lelandjansen added the bug Something isn't working label Apr 29, 2019
@lelandjansen lelandjansen self-assigned this Apr 29, 2019
@lelandjansen lelandjansen mentioned this issue May 3, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant