Skip to content

Commit 0f92937

Browse files
authored
Cargo: Fix compiling driver from sources outside of the marker repo on Windows (#319)
* Fix compiling driver from sources outside of the marker repo on Windows * Fix cargo fmt * Update changelog for 0.4.1
1 parent 7baa296 commit 0f92937

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ The following components are considered to be internal and they are excluded fro
2424

2525
## [Unreleased]
2626

27-
The [v0.5.0 milestone] contains a list of planned changes.
27+
## [0.4.1] - 2023-11-24
28+
29+
[#319]: https://github.com/rust-marker/marker/pull/319
30+
31+
### Fixed
32+
33+
- [#319]: Fix compiling driver from sources outside of the marker repo on Windows
2834

29-
[v0.5.0 milestone]: https://github.com/rust-marker/marker/milestone/5
3035

3136
## [0.4.0] - 2023-11-16
3237

cargo-marker/src/backend/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use super::cargo::Cargo;
12
use super::toolchain::{get_toolchain_folder, rustup_which, Toolchain};
23
use crate::error::prelude::*;
34
use crate::observability::display::print_stage;
@@ -140,11 +141,10 @@ fn build_driver(toolchain: &str, version: &str, mut additional_rustc_flags: Opti
140141
}
141142

142143
// Build driver
143-
let mut cmd = Command::new("cargo");
144+
let mut cmd = Cargo::with_toolchain(toolchain).command();
144145
if is_local_driver() {
145146
cmd.args(["build", "--bin", "marker_rustc_driver"]);
146147
} else {
147-
cmd.env("RUSTUP_TOOLCHAIN", toolchain);
148148
cmd.args(["install", "marker_rustc_driver", "--version", version, "--force"]);
149149

150150
*additional_rustc_flags.get_or_insert_with(Default::default) += " --cap-lints=allow";

0 commit comments

Comments
 (0)