diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-27 09:56:41 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-27 09:56:41 +0000 |
commit | 0639250d5ae78b2a1d0c6949ae91f098bfb35913 (patch) | |
tree | e859195730aec2e6d8b4adbf7bce395568a5403e /xtask/src | |
parent | 9a8329a3a7b0a1e68336a0a1b9e5235eba05efb8 (diff) | |
parent | 520b0c8faf62652e56c9ce3696b4100354e03dc5 (diff) |
Merge #3341
3341: Make xtask install path-agnostic r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/install.rs | 6 | ||||
-rw-r--r-- | xtask/src/not_bash.rs | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs index 3df021acc..1d13b26da 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs | |||
@@ -4,7 +4,10 @@ use std::{env, path::PathBuf, str}; | |||
4 | 4 | ||
5 | use anyhow::{bail, format_err, Context, Result}; | 5 | use anyhow::{bail, format_err, Context, Result}; |
6 | 6 | ||
7 | use crate::not_bash::{pushd, run}; | 7 | use crate::{ |
8 | not_bash::{pushd, run}, | ||
9 | project_root, | ||
10 | }; | ||
8 | 11 | ||
9 | // Latest stable, feel free to send a PR if this lags behind. | 12 | // Latest stable, feel free to send a PR if this lags behind. |
10 | const REQUIRED_RUST_VERSION: u32 = 41; | 13 | const REQUIRED_RUST_VERSION: u32 = 41; |
@@ -24,6 +27,7 @@ pub struct ServerOpt { | |||
24 | 27 | ||
25 | impl InstallCmd { | 28 | impl InstallCmd { |
26 | pub fn run(self) -> Result<()> { | 29 | pub fn run(self) -> Result<()> { |
30 | let _dir = pushd(project_root()); | ||
27 | let both = self.server.is_some() && self.client.is_some(); | 31 | let both = self.server.is_some() && self.client.is_some(); |
28 | if cfg!(target_os = "macos") { | 32 | if cfg!(target_os = "macos") { |
29 | fix_path_for_mac().context("Fix path for mac")? | 33 | fix_path_for_mac().context("Fix path for mac")? |
diff --git a/xtask/src/not_bash.rs b/xtask/src/not_bash.rs index d5577cce9..c49ad671d 100644 --- a/xtask/src/not_bash.rs +++ b/xtask/src/not_bash.rs | |||
@@ -130,6 +130,7 @@ impl Env { | |||
130 | } | 130 | } |
131 | 131 | ||
132 | fn pushd(&mut self, dir: PathBuf) { | 132 | fn pushd(&mut self, dir: PathBuf) { |
133 | let dir = self.cwd().join(dir); | ||
133 | self.pushd_stack.push(dir) | 134 | self.pushd_stack.push(dir) |
134 | } | 135 | } |
135 | fn popd(&mut self) { | 136 | fn popd(&mut self) { |