rackerlabs / kthresher

Tool to remove unused kernels in Debian/Ubuntu
Apache License 2.0
17 stars 12 forks source link

Do not print help when no tty is detected. #59

Closed tonyskapunk closed 6 years ago

tonyskapunk commented 6 years ago

On https://github.com/rackerlabs/kthresher/pull/57#issuecomment-427698307 it was found that kthresher will trigger a non-zero exit code when no action is performed. This is troublesome for timers in systemd, this commit detects if the execution of no actions is triggered without a tty and exits with 0 avoiding the non-zero exit code and printing the help.

-- Closes #48

tonyskapunk commented 6 years ago

Merging now in development