mirror of
https://github.com/nushell/nushell
synced 2024-12-29 06:23:11 +00:00
Rename env file to .nu-env (#1953)
This commit is contained in:
parent
2fa83b0bbe
commit
3bb2c9beed
1 changed files with 3 additions and 6 deletions
|
@ -101,7 +101,7 @@ impl DirectorySpecificEnvironment {
|
|||
//Start in the current directory, then traverse towards the root with working_dir to see if we are in a subdirectory of a valid directory.
|
||||
while let Some(wdir) = working_dir {
|
||||
if wdir == dir.as_path() {
|
||||
let toml_doc = std::fs::read_to_string(wdir.join(".nu").as_path())?
|
||||
let toml_doc = std::fs::read_to_string(wdir.join(".nu-env").as_path())?
|
||||
.parse::<toml::Value>()?;
|
||||
|
||||
let vars_in_current_file = toml_doc
|
||||
|
@ -109,15 +109,12 @@ impl DirectorySpecificEnvironment {
|
|||
.ok_or_else(|| {
|
||||
std::io::Error::new(
|
||||
std::io::ErrorKind::InvalidData,
|
||||
"No [env] section in .nu-file",
|
||||
"No [env] section in .nu-env",
|
||||
)
|
||||
})?
|
||||
.as_table()
|
||||
.ok_or_else(|| {
|
||||
Error::new(
|
||||
ErrorKind::InvalidData,
|
||||
"Malformed [env] section in .nu-file",
|
||||
)
|
||||
Error::new(ErrorKind::InvalidData, "Malformed [env] section in .nu-env")
|
||||
})?;
|
||||
|
||||
let mut keys_in_current_nufile = vec![];
|
||||
|
|
Loading…
Reference in a new issue