Skip to content

Commit 7740bac

Browse files
committed
Prefer target.env values over build.env config.
We currently use `build.env` over `target.$(...).env`, which means we cannot set a default value and then override it for a specific target. Given the following config file: ```toml [build.env] xargo = true [target.aarch64-unknown-linux-gnu.env] xargo = false ``` We currently would use `xargo` even on `aarch64-unknown-linux-gnu`, when we should not, and only use `xargo` for every other target. Closes #773.
1 parent cad2634 commit 7740bac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ impl Config {
137137
(None, None)
138138
};
139139

140-
match (env_build, toml_build) {
140+
match (env_target, toml_target) {
141141
(Some(value), _) => return Some(value),
142142
(None, Some(value)) => return Some(value),
143143
(None, None) => {}
144144
};
145145

146-
match (env_target, toml_target) {
146+
match (env_build, toml_build) {
147147
(Some(value), _) => return Some(value),
148148
(None, Some(value)) => return Some(value),
149149
(None, None) => {}

0 commit comments

Comments
 (0)