Skip to content

Commit 63eb865

Browse files
fix: musl build errors by using cargo_bin instead (#920)
1 parent 50f4110 commit 63eb865

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ amzn-qdeveloper-streaming-client = { path = "crates/amzn-qdeveloper-streaming-cl
3131
anstream = "0.6.13"
3232
anyhow = "1.0.98"
3333
appkit-nsworkspace-bindings = { path = "crates/macos-utils/appkit-nsworkspace-bindings" }
34+
assert_cmd = "2.0.17" # This version is required for musl builds to succeed
3435
async-trait = "0.1.87"
3536
aws-smithy-runtime-api = "1.6.1"
3637
aws-smithy-types = "1.2.10"

crates/figterm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ winapi = { version = "0.3", features = [
8585
winreg = "0.55.0"
8686

8787
[dev-dependencies]
88-
assert_cmd = "2.0.8"
88+
assert_cmd.workspace = true
8989
predicates = "3.0.1"
9090
tempfile.workspace = true

crates/figterm/tests/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use predicates::prelude::*;
55

66
#[test]
77
fn version_flag_has_status_code_zero() {
8-
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("figterm"));
8+
let mut cmd = Command::cargo_bin("figterm").unwrap();
99
cmd.arg("--version");
1010

1111
cmd.assert()

crates/q_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ windows = { version = "0.58.0", features = ["Win32_System_Threading"] }
9898
winapi = { version = "0.3", features = ["consoleapi"] }
9999

100100
[dev-dependencies]
101-
assert_cmd = "2.0"
101+
assert_cmd.workspace = true
102102
criterion = "0.6.0"
103103
insta.workspace = true
104104
paste = "1.0.11"

crates/q_cli/tests/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub use predicates::prelude::*;
1010
pub type Result<T, E = Box<dyn std::error::Error>> = std::result::Result<T, E>;
1111

1212
pub fn cli() -> Command {
13-
Command::new(assert_cmd::cargo::cargo_bin!("q_cli"))
13+
Command::cargo_bin("q_cli").unwrap()
1414
}
1515

1616
pub fn is_json() -> FnPredicate<impl Fn(&str) -> bool, str> {

crates/q_cli/tests/init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ macro_rules! init_test {
2222
paste! {
2323
#[cfg(not(windows))]
2424
fn [<init_output_ $shell _ $stage _ $file>]() -> Result<String, Box<dyn std::error::Error>> {
25-
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("q_cli"));
25+
let mut cmd = Command::cargo_bin("q_cli").unwrap();
2626
cmd.arg("init").arg($shell).arg($stage).arg("--rcfile").arg($file);
2727
cmd.env("Q_INIT_SNAPSHOT_TEST", "1");
2828
let out = cmd.assert().success().get_output().stdout.clone();

0 commit comments

Comments
 (0)