Skip to content

Silent failure when passing a directory as input#211

Open
LuBashQ wants to merge 2 commits intoifd3f:mainfrom
LuBashQ:feature/208
Open

Silent failure when passing a directory as input#211
LuBashQ wants to merge 2 commits intoifd3f:mainfrom
LuBashQ:feature/208

Conversation

@LuBashQ
Copy link
Contributor

@LuBashQ LuBashQ commented Dec 22, 2025

Summary

Addresses and closes #208.

  • Add requirement to image argument to be a file (or a symbolic link to a file), preventing accidentally passing directories
  • Add file name and line number to log entries

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • This change requires a documentation update
  • This change contains modifications to the --help output
    • I ran scripts/regenerate_readme.py from the root directory to ensure it has the latest sample output

Test plan

Try to burn a directory, and it should fail with the following error

$ caligula burn --force --compression none --hash skip -o /dev/sda /tmp/caligula-668102-1766420269461/
error: invalid value '/tmp/caligula-668102-1766420269461/' for '<IMAGE>': path is not a file or symlink to a file

For more information, try '--help'.

Log files should contain the file and line number where it was generated

$ cat /tmp/caligula-1027724-1766426069683/log/main.log 
2025-12-22T17:54:29.683412Z  INFO caligula::tty: src/tty.rs:14: attempting to store terminal state before program started
2025-12-22T17:54:29.683424Z DEBUG caligula::ui::main: src/ui/main.rs:35: Starting primary process
...

Image argument must be a file or a symlink to a file.

Fixes ifd3f#208

Signed-off-by: LuBashQ <cristian.lupascu.nicolae@gmail.com>
Signed-off-by: LuBashQ <cristian.lupascu.nicolae@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Silent failure when passing a directory as input

1 participant