use login shell when executing topgrade (#1327)
This commit is contained in:
@@ -149,12 +149,12 @@ fn upgrade_wsl_distribution(wsl: &Path, dist: &str, ctx: &ExecutionContext) -> R
|
|||||||
//
|
//
|
||||||
// ```rust
|
// ```rust
|
||||||
// command
|
// command
|
||||||
// .args(["-d", dist, "bash", "-c"])
|
// .args(["-d", dist, "bash", "-lc"])
|
||||||
// .arg(format!("TOPGRADE_PREFIX={dist} exec {topgrade}"));
|
// .arg(format!("TOPGRADE_PREFIX={dist} exec {topgrade}"));
|
||||||
// ```
|
// ```
|
||||||
//
|
//
|
||||||
// creates a command string like:
|
// creates a command string like:
|
||||||
// > `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -c 'TOPGRADE_PREFIX=Ubuntu exec /bin/topgrade'`
|
// > `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -lc 'TOPGRADE_PREFIX=Ubuntu exec /bin/topgrade'`
|
||||||
//
|
//
|
||||||
// Adding the following:
|
// Adding the following:
|
||||||
//
|
//
|
||||||
@@ -163,7 +163,7 @@ fn upgrade_wsl_distribution(wsl: &Path, dist: &str, ctx: &ExecutionContext) -> R
|
|||||||
// ```
|
// ```
|
||||||
//
|
//
|
||||||
// appends the next argument like so:
|
// appends the next argument like so:
|
||||||
// > `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -c 'TOPGRADE_PREFIX=Ubuntu exec /bin/topgrade' -v`
|
// > `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -lc 'TOPGRADE_PREFIX=Ubuntu exec /bin/topgrade' -v`
|
||||||
// which means `-v` isn't passed to `topgrade`.
|
// which means `-v` isn't passed to `topgrade`.
|
||||||
let mut args = String::new();
|
let mut args = String::new();
|
||||||
if ctx.config().verbose() {
|
if ctx.config().verbose() {
|
||||||
@@ -171,7 +171,7 @@ fn upgrade_wsl_distribution(wsl: &Path, dist: &str, ctx: &ExecutionContext) -> R
|
|||||||
}
|
}
|
||||||
|
|
||||||
command
|
command
|
||||||
.args(["-d", dist, "bash", "-c"])
|
.args(["-d", dist, "bash", "-lc"])
|
||||||
.arg(format!("TOPGRADE_PREFIX={dist} exec {topgrade} {args}"));
|
.arg(format!("TOPGRADE_PREFIX={dist} exec {topgrade} {args}"));
|
||||||
|
|
||||||
if ctx.config().yes(Step::Wsl) {
|
if ctx.config().yes(Step::Wsl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user