Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 24, 2024
1 parent b40a46a commit f24d7fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/test_commands_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def test_update_cache(xession, tmp_path):

assert file2.samefile(cached[basename][0])


def test_nixos_coreutils(tmp_path):
"""On NixOS the core tools are the symlinks to one universal ``coreutils`` binary file."""
path = tmp_path / "core"
Expand Down
4 changes: 2 additions & 2 deletions xonsh/commands_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ def default_predictor_readbin(self, name, cmd0, timeout, failure):
return failure
if not os.path.isfile(fname):
return failure
if (link := self.readsymlink(fname)) and link.endswith('coreutils'):
if (link := self.readsymlink(fname)) and link.endswith("coreutils"):
"""
On NixOS the core tools are the symlinks to one universal ``coreutils`` binary file.
On NixOS the core tools are the symlinks to one universal ``coreutils`` binary file.
Detect it and use the default mode.
"""
return failure
Expand Down

0 comments on commit f24d7fb

Please sign in to comment.