Skip to content

Commit

Permalink
Update deps, fix exit codes in pomsky-bin
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloso committed Aug 3, 2022
1 parent d3b3a6a commit 0ed11d0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 32 deletions.
44 changes: 22 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pomsky-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ path = "src/main.rs"

[dependencies]
atty = "0.2.14"
thiserror = "1.0.30"
thiserror = "1.0.32"
owo-colors = { version = "3.4.0", features = ["supports-color"] }

[dependencies.miette]
version = "4.2.1"
version = "4.7.1"
features = ["fancy-no-backtrace"]

[dependencies.pomsky]
Expand All @@ -33,6 +33,6 @@ path = "../pomsky-lib"
features = ["dbg", "miette", "suggestions"]

[dependencies.clap]
version = "3.1.0"
version = "3.2.16"
default-features = false
features = ["std", "derive", "wrap_help", "color"]
11 changes: 9 additions & 2 deletions pomsky-bin/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use std::io::{self, Read, Write};
use std::{
io::{self, Read, Write},
process::exit,
};

use atty::Stream;
use clap::Parser as _;
Expand Down Expand Up @@ -28,6 +31,7 @@ pub fn main() {
error.to_string(),
None,
));
exit(2);
}
},
(None, None) if atty::isnt(Stream::Stdin) => {
Expand All @@ -43,6 +47,7 @@ pub fn main() {
format!("Could not parse stdin: {e}"),
None,
));
exit(3);
}
}
}
Expand All @@ -53,6 +58,7 @@ pub fn main() {
"You can only provide an input or a path, but not both".into(),
None,
));
exit(4);
}
(None, None) => {
print_diagnostic(&Diagnostic::ad_hoc(
Expand All @@ -61,6 +67,7 @@ pub fn main() {
"No input provided".into(),
None,
));
exit(5);
}
}
}
Expand All @@ -71,7 +78,7 @@ fn compile(input: &str, args: &Args) {
Ok(res) => res,
Err(err) => {
print_parse_error(err, input);
std::process::exit(1);
exit(1);
}
};

Expand Down
10 changes: 5 additions & 5 deletions pomsky-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ dbg = []
suggestions = ["strsim"]

[dependencies]
thiserror = "1.0.31"
nom = "7.1.0"
thiserror = "1.0.32"
nom = "7.1.1"
strsim = { version = "0.10.0", optional = true }

[dependencies.arbitrary]
version = "1.1.2"
version = "1.1.3"
features = ["derive"]
optional = true

Expand All @@ -36,8 +36,8 @@ optional = true

[dev-dependencies]
atty = "0.2.14"
once_cell = "1.12.0"
regex = "1.5.6"
once_cell = "1.13.0"
regex = "1.6.0"

[[test]]
name = "it"
Expand Down

0 comments on commit 0ed11d0

Please sign in to comment.