You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./blight inc 10
Error A panic occured
Reason failed to open lock file: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
Location src/utils.rs:378:10
Tip This is unexpected behavior. Please report this issue at https://github.com/VoltaireNoir/blight/issues
fish: Job 1, './blight inc 10' terminated by signal SIGABRT (Abort)
Most applications with lock-files that I've used tend to exit gracefully, as this kind of thing does happen from time-to-time.
Recommend switching from expect and the resulting panic, to matching the failure and reporting a less panicky message to the user along the lines of eg pacman:
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck
Background
I just installed and ran this on an arch-type system, and probably did something wrong at some point resulting in the stray lock-file.
The text was updated successfully, but these errors were encountered:
Thank you for reporting the issue. You're right about turning this into a normal error instead of making the program panic. I'll make fix it and cut a new release soon.
When lock-file exists, currently https://github.com/VoltaireNoir/blight/blob/main/src/utils.rs#L374-L378 causes a panic:
Most applications with lock-files that I've used tend to exit gracefully, as this kind of thing does happen from time-to-time.
Recommend switching from
expect
and the resultingpanic
, tomatch
ing the failure and reporting a less panicky message to the user along the lines of eg pacman:Background
I just installed and ran this on an arch-type system, and probably did something wrong at some point resulting in the stray lock-file.
The text was updated successfully, but these errors were encountered: