Skip to content

Commit

Permalink
internal: _global_var returns new value instead of _global_state
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Sep 12, 2021
1 parent 80eaa46 commit d9b45ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/interp/internal.jq
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _error_str: "error: \(.)";
def _errorln: ., "\n" | stderr;

def _global_var($k): _global_state[$k];
def _global_var($k; f): _global_state(_global_state | .[$k] |= f);
def _global_var($k; f): _global_state(_global_state | .[$k] |= f) | .[$k];

def _include_paths: _global_var("include_paths");
def _include_paths(f): _global_var("include_paths"; f);
Expand Down

0 comments on commit d9b45ba

Please sign in to comment.