Félix Saparelli
4b00f5f143
Split crates and clean up structure of codebase ( #294 )
...
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-20 11:24:12 +00:00
Jiahao XU
bf700f9012
Improve err msg when source is missing in BinFile::install_bin
( #301 )
...
* Improve err msg in `helpers::atomic_install`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Check for missing `source` in `install_bin`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `install_bin`: Use `try_exists` instead of `exists`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Do not test `cargo-deb` in `ci-scripts/tests.sh`
Due to the fact that it uses gnu sparse extension which is not supported
by crate `tar`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-20 00:25:51 +10:00
Félix Saparelli
763d4610e5
Don't prompt if there's nothing to do ( #293 )
...
Fixes #291
2022-08-09 09:09:21 +00:00
Jiahao XU
f4dd75ef9b
Update doc on BinstallError::UserAbort
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 19:44:12 +10:00
Félix Saparelli
47fd7c14a6
Add -V, clean up errors and help text ( #259 )
...
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-30 17:26:52 +12:00
Jiahao XU
46cf20a3f7
Add new variant BinstallError::TaskJoinError
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 20:40:31 +10:00
Jiahao XU
08190ac179
Add ManifestPathConflictedWithBatchInstallation
...
to error `BinstallError`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 19:09:59 +10:00
Jiahao XU
aecc474f29
Rm unused BinstallError::VersionWarning
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-12 18:34:20 +10:00
Jiahao XU
c87941211c
Treat 1.2.3
as =1.2.3
to match cargo-install
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-12 18:33:31 +10:00
Jiahao XU
e2207f7b59
Add diagnostic(help)
to DuplicateVersionReq
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-12 17:12:01 +10:00
Jiahao XU
41961ce218
Add new variant BinstallError::DuplicateVersionReq
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-12 17:03:12 +10:00
Jiahao XU
2f38925ee4
Refactor From<io::Error> for BinstallError
...
Avoid one `expect`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 14:10:27 +10:00
Jiahao XU
aba1ba7b6d
Manually impl From<io::Error> for BinstallError
...
so that if the `io::Error` wraps a `BinstallError`, we would just unwrap
it and return the inner `BinstallError`.
Otherwise, just wrap the `io::Error` in a `BinstallError`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:05:15 +10:00
Félix Saparelli
77b331f97c
Add error codes to documentation
2022-06-01 00:29:18 +12:00
Félix Saparelli
529781a9a9
Format and link version mismatch warning
2022-06-01 00:29:18 +12:00
Félix Saparelli
7f0c818313
Don’t print "Fatal error" for UserAbort
2022-06-01 00:29:17 +12:00
Félix Saparelli
33f4c76826
Add help text for when a crate is not found
2022-06-01 00:29:17 +12:00
Félix Saparelli
84ebc0039e
Pretty-print errors
2022-06-01 00:29:17 +12:00
Félix Saparelli
bd35c473a9
Use new Termination trait
2022-06-01 00:29:17 +12:00
Félix Saparelli
f56ed6fc4c
Add per-error exit codes
2022-06-01 00:29:17 +12:00
Félix Saparelli
f9e69503b0
Document the library error types
2022-06-01 00:29:17 +12:00
Félix Saparelli
c0eaffb05d
Refactor for rich errors, split user abort and genuine error
2022-06-01 00:29:14 +12:00