mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 18:42:42 +02:00
WIP
This commit is contained in:
@ -40,11 +40,11 @@ impl Stack {
|
||||
let mut output = Stack::new();
|
||||
|
||||
for capture in captures {
|
||||
output.vars.insert(
|
||||
*capture,
|
||||
self.get_var(*capture)
|
||||
.expect("internal error: capture of missing variable"),
|
||||
);
|
||||
// Note: this assumes we have calculated captures correctly and that commands
|
||||
// that take in a var decl will manually set this into scope when running the blocks
|
||||
if let Ok(value) = self.get_var(*capture) {
|
||||
output.vars.insert(*capture, value);
|
||||
}
|
||||
}
|
||||
|
||||
output
|
||||
|
Reference in New Issue
Block a user