Skip to content

Commit

Permalink
fix: xonsh hook
Browse files Browse the repository at this point in the history
It was raising a TypeError:

```
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
TypeError: 'method' object is not subscriptable
Exception raised in event handler; ignored.
```
  • Loading branch information
CharString committed Nov 13, 2023
1 parent 6ff51d8 commit a26321e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/shell/snapshots/rtx__shell__xonsh__tests__unset_env.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ from os import environ
from xonsh.built_ins import XSH

envx = XSH.env
envx.pop[ 'FOO',None]
environ.pop['FOO',None]
envx.pop( 'FOO',None)
environ.pop('FOO',None)

4 changes: 2 additions & 2 deletions src/shell/xonsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ impl Shell for Xonsh {
from xonsh.built_ins import XSH
envx = XSH.env
envx.pop[ '{k}',None]
environ.pop['{k}',None]
envx.pop( '{k}',None)
environ.pop('{k}',None)
"#,
k = shell_escape::unix::escape(k.into()) // todo: drop illegal chars, not escape?
)
Expand Down

0 comments on commit a26321e

Please sign in to comment.