nushell/crates/nu-cmd-lang/src
Wind 1e051e573d
fix $env.FILE_PWD and $env.CURRENT_FILE inside use (#14101)
# Description
Fixes: https://github.com/nushell/nushell/issues/13425

It's just a follow up to #13958.

User input can be a directory, in this case, we need to use the return
value of `find_in_dirs_env` carefully, so in case, I renamed
maybe_file_path to maybe_file_path_or_dir to emphasize it.


# User-Facing Changes
`$env.FILE_PWD` and `$env.CURRENT_FILE` will be more reliable to use.

# Tests + Formatting
Added 2 tests
2024-11-05 14:12:01 +08:00
..
core_commands fix $env.FILE_PWD and $env.CURRENT_FILE inside use (#14101) 2024-11-05 14:12:01 +08:00
default_context.rs Remove lazy records (#12682) 2024-05-03 08:36:10 +08:00
example_support.rs Set current working directory at startup (#12953) 2024-09-25 13:04:26 -05:00
example_test.rs remove def-env and export def-env (#10999) 2023-11-19 23:25:09 +08:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00