forked from extern/nushell
Revert "Allow NU_LIBS_DIR and friends to be const" (#8501)
Reverts nushell/nushell#8310 In anticipation that we may want to revert this PR. I'm starting the process because of this issue. This stopped working ``` let-env NU_LIB_DIRS = [ ($nu.config-path | path dirname | path join 'scripts') 'C:\Users\username\source\repos\forks\nu_scripts' ($nu.config-path | path dirname) ] ``` You have to do this now instead. ``` const NU_LIB_DIRS = [ 'C:\Users\username\AppData\Roaming\nushell\scripts' 'C:\Users\username\source\repos\forks\nu_scripts' 'C:\Users\username\AppData\Roaming\nushell' ] ``` In talking with @kubouch, he was saying that the `let-env` version should keep working. Hopefully it's a small change.
This commit is contained in:
@ -39,7 +39,7 @@ pub trait CallExt {
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
stack: &mut Stack,
|
||||
name: &str,
|
||||
pos: usize,
|
||||
) -> Result<T, ShellError>;
|
||||
}
|
||||
|
||||
@ -111,9 +111,9 @@ impl CallExt for Call {
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
stack: &mut Stack,
|
||||
name: &str,
|
||||
pos: usize,
|
||||
) -> Result<T, ShellError> {
|
||||
if let Some(expr) = self.get_parser_info(name) {
|
||||
if let Some(expr) = self.parser_info_nth(pos) {
|
||||
let result = eval_expression(engine_state, stack, expr)?;
|
||||
FromValue::from_value(&result)
|
||||
} else if self.parser_info.is_empty() {
|
||||
|
Reference in New Issue
Block a user