aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/cargo_command.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/xtask/src/cargo_command.rs b/xtask/src/cargo_command.rs
index b0102ce..401bab4 100644
--- a/xtask/src/cargo_command.rs
+++ b/xtask/src/cargo_command.rs
@@ -355,6 +355,12 @@ impl core::fmt::Display for CargoCommand<'_> {
impl<'a> CargoCommand<'a> {
pub fn as_cmd_string(&self) -> String {
+ let env = if let Some((key, value)) = self.extra_env() {
+ format!("{key}=\"{value}\" ")
+ } else {
+ format!("")
+ };
+
let cd = if let Some(Some(chdir)) = self.chdir().map(|p| p.to_str()) {
format!("cd {chdir} && ")
} else {
@@ -363,7 +369,7 @@ impl<'a> CargoCommand<'a> {
let executable = self.executable();
let args = self.args().join(" ");
- format!("{cd}{executable} {args}")
+ format!("{env}{cd}{executable} {args}")
}
fn command(&self) -> &'static str {