Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotADirectoryError: [Errno 20] Not a directory: 'dircolors' #5299

Closed
anki-code opened this issue Mar 11, 2024 · 0 comments · Fixed by #5300
Closed

NotADirectoryError: [Errno 20] Not a directory: 'dircolors' #5299

anki-code opened this issue Mar 11, 2024 · 0 comments · Fixed by #5300

Comments

@anki-code
Copy link
Member

anki-code commented Mar 11, 2024

Running on Mac without dircolors installed.

python3 -m xonsh
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/xonsh/main.py", line 470, in main
    sys.exit(main_xonsh(args))
  File "/usr/local/lib/python3.10/site-packages/xonsh/main.py", line 511, in main_xonsh
    print_welcome_screen()
  File "/usr/local/lib/python3.10/site-packages/xonsh/xonfig.py", line 826, in print_welcome_screen
    print_color(line)
  File "/usr/local/lib/python3.10/site-packages/xonsh/tools.py", line 2055, in print_color
    xsh.shell.shell.print_color(string, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/xonsh/ptk_shell/shell.py", line 542, in print_color
    tokens = partial_color_tokenize(string)
  File "/usr/local/lib/python3.10/site-packages/xonsh/style_tools.py", line 70, in partial_color_tokenize
    styles = XSH.shell.shell.styler.styles
  File "/usr/local/lib/python3.10/site-packages/xonsh/base_shell.py", line 337, in styler
    self._styler = XonshStyle(env.get("XONSH_COLOR_STYLE"))
  File "/usr/local/lib/python3.10/site-packages/xonsh/pyghooks.py", line 372, in __init__
    self.style_name = style_name
  File "/usr/local/lib/python3.10/site-packages/xonsh/pyghooks.py", line 413, in style_name
    for file_type, xonsh_color in XSH.env.get("LS_COLORS", {}).items():
  File "/usr/local/lib/python3.10/site-packages/xonsh/environ.py", line 2234, in get
    return self[key]
  File "/usr/local/lib/python3.10/site-packages/xonsh/environ.py", line 2171, in __getitem__
    val = self._d[key] = val(self)
  File "/usr/local/lib/python3.10/site-packages/xonsh/environ.py", line 693, in default_lscolors
    lsc = LsColors.fromdircolors()
  File "/usr/local/lib/python3.10/site-packages/xonsh/environ.py", line 485, in fromdircolors
    out = subprocess.check_output(
  File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1847, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'dircolors'
Xonsh encountered an issue during launch
Failback to /bin/zsh

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant