export-env
This commit is contained in:
parent
250bcd3bc2
commit
c74f821759
7
crates/nu-command/src/env/export_env.rs
vendored
7
crates/nu-command/src/env/export_env.rs
vendored
|
@ -33,6 +33,10 @@ impl Command for ExportEnv {
|
||||||
CommandType::Keyword
|
CommandType::Keyword
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn requires_ast_for_arguments(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn run(
|
fn run(
|
||||||
&self,
|
&self,
|
||||||
engine_state: &EngineState,
|
engine_state: &EngineState,
|
||||||
|
@ -40,9 +44,8 @@ impl Command for ExportEnv {
|
||||||
call: &Call,
|
call: &Call,
|
||||||
input: PipelineData,
|
input: PipelineData,
|
||||||
) -> Result<PipelineData, ShellError> {
|
) -> Result<PipelineData, ShellError> {
|
||||||
let call = call.assert_ast_call()?; // FIXME
|
|
||||||
let block_id = call
|
let block_id = call
|
||||||
.positional_nth(0)
|
.positional_nth(caller_stack, 0)
|
||||||
.expect("checked through parser")
|
.expect("checked through parser")
|
||||||
.as_block()
|
.as_block()
|
||||||
.expect("internal error: missing block");
|
.expect("internal error: missing block");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user