Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't use Command::new(bin_name) as it won't work on Windows #750

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@

// Vscode has update command only since 1.86 version ("january 2024" update), disable the update for prior versions
// Use command `code --version` which returns 3 lines: version, git commit, instruction set. We parse only the first one
let version: Result<Version> = match Command::new("code")
let version: Result<Version> = match Command::new(&vscode)

Check warning on line 361 in src/steps/generic.rs

View check run for this annotation

Codecov / codecov/patch

src/steps/generic.rs#L361

Added line #L361 was not covered by tests
.arg("--version")
.output_checked_utf8()?
.stdout
Expand Down Expand Up @@ -389,7 +389,7 @@

// pipx version 1.4.0 introduced a new command argument `pipx upgrade-all --quiet`
// (see https://pipx.pypa.io/stable/docs/#pipx-upgrade-all)
let version_str = Command::new("pipx")
let version_str = Command::new(&pipx)

Check warning on line 392 in src/steps/generic.rs

View check run for this annotation

Codecov / codecov/patch

src/steps/generic.rs#L392

Added line #L392 was not covered by tests
.args(["--version"])
.output_checked_utf8()
.map(|s| s.stdout.trim().to_owned());
Expand All @@ -404,7 +404,7 @@
pub fn run_conda_update(ctx: &ExecutionContext) -> Result<()> {
let conda = require("conda")?;

let output = Command::new("conda")
let output = Command::new(&conda)

Check warning on line 407 in src/steps/generic.rs

View check run for this annotation

Codecov / codecov/patch

src/steps/generic.rs#L407

Added line #L407 was not covered by tests
.args(["config", "--show", "auto_activate_base"])
.output_checked_utf8()?;
debug!("Conda output: {}", output.stdout);
Expand All @@ -425,7 +425,7 @@
pub fn run_mamba_update(ctx: &ExecutionContext) -> Result<()> {
let mamba = require("mamba")?;

let output = Command::new("mamba")
let output = Command::new(&mamba)

Check warning on line 428 in src/steps/generic.rs

View check run for this annotation

Codecov / codecov/patch

src/steps/generic.rs#L428

Added line #L428 was not covered by tests
.args(["config", "--show", "auto_activate_base"])
.output_checked_utf8()?;
debug!("Mamba output: {}", output.stdout);
Expand Down
Loading