chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
69 stars 16 forks source link

Output a helpful message when there's no configuration #150

Open chshersh opened 1 year ago

chshersh commented 1 year ago

Currently, when you run tool sync and there's no .tool.toml file, you see the following message:

❯ tool sync
Aborting 'tool-sync' with error:

    * Error parsing configuration at path /home/chshersh/.tool.toml: [IO Error] No such file or directory (os error 2)

Instead, it would be better to tell more information:

This would require matching on error here:

https://github.com/chshersh/tool-sync/blob/a64ab97025f635472e8526ef362e6dc57752fd52/src/config/toml.rs#L82-L86