mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Fix dircolors NotADirectoryError (#5300)
* Update environ.py * Create fix_dircolors_NotADirectoryError.rst
This commit is contained in:
parent
f5ae75268a
commit
5fd9a25d09
2 changed files with 24 additions and 1 deletions
23
news/fix_dircolors_NotADirectoryError.rst
Normal file
23
news/fix_dircolors_NotADirectoryError.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* Fixed NotADirectoryError during load dircolors.
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
|
@ -485,7 +485,7 @@ class LsColors(cabc.MutableMapping):
|
|||
out = subprocess.check_output(
|
||||
cmd, env=denv, text=True, stderr=subprocess.DEVNULL
|
||||
)
|
||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||
except (subprocess.CalledProcessError, FileNotFoundError, NotADirectoryError):
|
||||
return cls(cls.default_settings)
|
||||
except OSError:
|
||||
# necessary to catch OSError: [WinError 740] The requested operation requires elevation
|
||||
|
|
Loading…
Add table
Reference in a new issue