Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DinisCruz committed Jul 27, 2024
1 parent be6bf63 commit 054a38b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osbot_utils/utils/Env.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def env__pwd():
return get_env('PWD', '')

def env__old_pwd__remove(value):
return value.replace(env__old_pwd(), '')
if env__old_pwd() != '/': # can't replace with old pwd is just /
return value.replace(env__old_pwd(), '')
return value

def env__terminal__is__xterm():
return os.getenv('TERM') == 'xterm'
Expand Down

0 comments on commit 054a38b

Please sign in to comment.