Skip to content

Commit a341122

Browse files
feat(cli): use fs_err to provide better err msg (#1210)
## Which issue does this PR close? `cargo run --bin iceberg-cli` ``` ICEBERG CLI v0.4.0 Error: No such file or directory (os error 2) ``` After ``` ICEBERG CLI v0.4.0 Error: failed to open file `/Users/xxchan/.icebergrc`: No such file or directory (os error 2) ``` Signed-off-by: xxchan <xxchan22f@gmail.com> Co-authored-by: Renjie Liu <liurenjie2008@gmail.com>
1 parent 3db9195 commit a341122

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ aws-sdk-glue = "1.39"
5757
bimap = "0.6"
5858
bytes = "1.9"
5959
chrono = "0.4.38"
60-
ctor = "0.2.8"
6160
clap = { version = "4.5.27", features = ["derive", "cargo"] }
61+
ctor = "0.2.8"
6262
datafusion = "45"
6363
datafusion-cli = "45"
6464
derive_builder = "0.20"
65-
expect-test = "1"
6665
dirs = "6"
66+
expect-test = "1"
6767
faststr = "0.2.31"
6868
fnv = "1.0.7"
69+
fs-err = "3.1.0"
6970
futures = "0.3"
7071
hive_metastore = "0.1"
7172
http = "1.1"
@@ -103,10 +104,10 @@ tempfile = "3.18"
103104
tera = "1"
104105
thrift = "0.17.0"
105106
tokio = { version = "1.44", default-features = false }
107+
toml = "0.8"
106108
tracing = "0.1.37"
107109
tracing-subscriber = "0.3.8"
108110
typed-builder = "0.20"
109-
toml = "0.8"
110111
url = "2.5.4"
111112
uuid = { version = "1.14", features = ["v7"] }
112113
volo = "0.10.6"

crates/integrations/cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ tracing-subscriber = {workspace = true}
4040
dirs = {workspace = true}
4141
stacker = {workspace = true}
4242
mimalloc = {workspace = true}
43+
fs-err = {workspace = true}
4344

4445
[package.metadata.cargo-machete]
4546
# These dependencies are added to ensure minimal dependency version

crates/integrations/cli/src/catalog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
use std::any::Any;
1919
use std::collections::HashMap;
20-
use std::fs::read_to_string;
2120
use std::path::Path;
2221
use std::sync::Arc;
2322

2423
use anyhow::anyhow;
2524
use datafusion::catalog::{CatalogProvider, CatalogProviderList};
25+
use fs_err::read_to_string;
2626
use iceberg_catalog_rest::{RestCatalog, RestCatalogConfig};
2727
use iceberg_datafusion::IcebergCatalogProvider;
2828
use toml::{Table as TomlTable, Value};

0 commit comments

Comments
 (0)