mirror of
https://github.com/nushell/nushell.git
synced 2025-04-22 12:18:20 +02:00
Fix $nu path separators on Windows (#7996)
I noticed that `$nu.loginshell-path` was using backward *and* forward slashes on Windows. #### Before `C:\Users\reill\AppData\Roaming\nushell/login.nu` #### After `C:\Users\reill\AppData\Roaming\nushell\login.nu` Fixed up 2 other similar issues while I was at it.
This commit is contained in:
parent
67d1249b2b
commit
58f0d0b945
@ -57,7 +57,8 @@ impl LazyRecord for NuVariable {
|
|||||||
span: self.span,
|
span: self.span,
|
||||||
})
|
})
|
||||||
} else if let Some(mut path) = nu_path::config_dir() {
|
} else if let Some(mut path) = nu_path::config_dir() {
|
||||||
path.push("nushell/config.nu");
|
path.push("nushell");
|
||||||
|
path.push("config.nu");
|
||||||
Ok(Value::String {
|
Ok(Value::String {
|
||||||
val: path.to_string_lossy().to_string(),
|
val: path.to_string_lossy().to_string(),
|
||||||
span: self.span,
|
span: self.span,
|
||||||
@ -73,7 +74,8 @@ impl LazyRecord for NuVariable {
|
|||||||
span: self.span,
|
span: self.span,
|
||||||
})
|
})
|
||||||
} else if let Some(mut path) = nu_path::config_dir() {
|
} else if let Some(mut path) = nu_path::config_dir() {
|
||||||
path.push("nushell/env.nu");
|
path.push("nushell");
|
||||||
|
path.push("env.nu");
|
||||||
Ok(Value::String {
|
Ok(Value::String {
|
||||||
val: path.to_string_lossy().to_string(),
|
val: path.to_string_lossy().to_string(),
|
||||||
span: self.span,
|
span: self.span,
|
||||||
@ -103,7 +105,8 @@ impl LazyRecord for NuVariable {
|
|||||||
}
|
}
|
||||||
"loginshell-path" => {
|
"loginshell-path" => {
|
||||||
if let Some(mut path) = nu_path::config_dir() {
|
if let Some(mut path) = nu_path::config_dir() {
|
||||||
path.push("nushell/login.nu");
|
path.push("nushell");
|
||||||
|
path.push("login.nu");
|
||||||
Ok(Value::String {
|
Ok(Value::String {
|
||||||
val: path.to_string_lossy().to_string(),
|
val: path.to_string_lossy().to_string(),
|
||||||
span: self.span,
|
span: self.span,
|
||||||
|
Loading…
Reference in New Issue
Block a user