caligula
caligula copied to clipboard
Improve error message for when devices are mounted or in use
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Plug in a USB
-
./caligula-x86_64-darwin burn caligula-x86_64-darwin
- Go through the prompts
- Select the plugged USB
- The osascript prompt pops up. Entering in the password, however, does not appear to grant sudo, and the password is asked in the terminal again.
- Running yields the error
Full terminal output:
> ./caligula-x86_64-darwin burn caligula-x86_64-darwin
Couldn't detect compression format for caligula-x86_64-darwin
> What format to use? no compression
> What is the file's hash?
Input is empty
> What is the file's hash?
Input is empty
? What is the file's hash? <canceled>
> Select target disk disk2 | Generic STORAGE DEVICE Media - 62.6 GB (disk, remov
able: yes)
Input: caligula-x86_64-darwin
Size: 4.0 MB
Compression: no compression
Output: disk2
Model: Generic STORAGE DEVICE Media
Size: 62.6 GB
Type: disk
Path: /dev/rdisk2
Removable: yes
> Is this okay? Yes
> We don't have permissions on /dev/rdisk2. Escalate using sudo? Yes
Password:
An unexpected error occurred: panicked at src/ui/main.rs:36:9:
Explicit failure signaled: Some(UnknownChildProcError("Resource busy (os error 16)"))
Please report bugs to https://github.com/ifd3f/caligula/issues and attach the following log files, if they exist:
- /var/folders/f1/0sb8zs9d5ps5pt4h1w9g8zzm0000gp/T/caligula/log/1714949843182.main.log
- /var/folders/f1/0sb8zs9d5ps5pt4h1w9g8zzm0000gp/T/caligula/log/1714949843182.child.log
Expected behavior
You only get asked for password once, and the burn happens
Log files
1714949843182.child.log 1714949843182.main.log
OS/Environment
- OS: MacOS Version 14.2.1 (23C71) x86_64
- Version: v0.4.4
- Distribution channel: release binary
Additional context
N/A