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

[BUG] Task locked on pueue edit if EDITOR environment variable not set #267

Closed
drewkett opened this issue Nov 29, 2021 · 2 comments
Closed
Assignees
Labels
s: Client This issue touches the pueue client t: Bug
Milestone

Comments

@drewkett
Copy link
Contributor

Describe the bug
If $EDITOR isn't set when running pueue edit, you get an error suggesting that EDITOR isn't set which is nice. However, the task then is locked presumably because the error early returns. This would ideally be handled such that the task is not locked.

Also I'm not sure what the right way to unlock a task, but it seems stash works. I'm not sure if this is documented anywhere.

To Reproduce

unset EDITOR
pueue edit <N>

Expected behavior
Ideally the locked state would be cleared if the editor failed to launch

Additional context

  • Linux
  • Pueue version 1.0.4

Also, thanks for the software. Super helpful

@drewkett drewkett changed the title [BUG] [BUG] Task locked if on pueue edit if EDITOR not set Nov 29, 2021
@Nukesor
Copy link
Owner

Nukesor commented Nov 30, 2021

Good point.
I guess it makes sense to unlock the task if either the variable doesn't exist or the editor exits with a non-zero exit code?

For a temporary work-around, you can manually enqueue the task. That way it doesn't stay in that locked state.

@Nukesor Nukesor changed the title [BUG] Task locked if on pueue edit if EDITOR not set [BUG] Task locked on pueue edit if EDITOR environment variable not set Nov 30, 2021
@drewkett
Copy link
Contributor Author

That is true as well with the exit codes. My inclination would be to only keep it locked if the editor is still running. I guess if the editor died via a signal, you might want it to stay locked, but I'm not sure if trying to handle that scenario is worth the trouble since I'm not sure how reliable the mechanism is to determine whether a child process is killed versus exit with non zero exit code.

Thanks for the tip, re: using enqueue.

@Nukesor Nukesor added the s: Client This issue touches the pueue client label Dec 30, 2021
@Nukesor Nukesor added this to the v2.0.0 milestone Jan 12, 2022
@Nukesor Nukesor closed this as completed Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: Client This issue touches the pueue client t: Bug
Projects
None yet
Development

No branches or pull requests

2 participants