Make remote mkdir shell-independent for compatibility (#32997)
- Closes: #30962 Nushell does not support mkdir -p So invoke sh -c "mkdir -p" instead which will also work under nushell. Release Notes: - Fixed ssh remotes running Nushell (and possibly other non posix-compliant shells) --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
17774b17fb
commit
014f93008a
1 changed files with 20 additions and 2 deletions
|
@ -1805,7 +1805,16 @@ impl SshRemoteConnection {
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
if let Some(parent) = tmp_path_gz.parent() {
|
if let Some(parent) = tmp_path_gz.parent() {
|
||||||
self.socket
|
self.socket
|
||||||
.run_command("mkdir", &["-p", &parent.to_string_lossy()])
|
.run_command(
|
||||||
|
"sh",
|
||||||
|
&[
|
||||||
|
"-c",
|
||||||
|
&shell_script!(
|
||||||
|
"mkdir -p {parent}",
|
||||||
|
parent = parent.to_string_lossy().as_ref()
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1877,7 +1886,16 @@ impl SshRemoteConnection {
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
if let Some(parent) = tmp_path_gz.parent() {
|
if let Some(parent) = tmp_path_gz.parent() {
|
||||||
self.socket
|
self.socket
|
||||||
.run_command("mkdir", &["-p", &parent.to_string_lossy()])
|
.run_command(
|
||||||
|
"sh",
|
||||||
|
&[
|
||||||
|
"-c",
|
||||||
|
&shell_script!(
|
||||||
|
"mkdir -p {parent}",
|
||||||
|
parent = parent.to_string_lossy().as_ref()
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue