Skip to content

Commit

Permalink
fix(builtins): skip unenumerable vars in set builtin (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
reubeno authored Jan 13, 2025
1 parent 504d098 commit e2aec7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions brush-core/src/builtins/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ impl builtins::Command for SetCommand {
fn display_all(context: &commands::ExecutionContext<'_>) -> Result<(), error::Error> {
// Display variables.
for (name, var) in context.shell.env.iter().sorted_by_key(|v| v.0) {
if !var.is_enumerable() {
continue;
}

writeln!(
context.stdout(),
"{name}={}",
Expand Down

0 comments on commit e2aec7b

Please sign in to comment.