Skip to content

Commit

Permalink
[F] Fix #286: Termux missing /usr/bin/env
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed May 15, 2024
1 parent 566011e commit d41a302
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hyfetch/neofetch_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ def run_neofetch_cmd(args: str, pipe: bool = False) -> str | None:
Run neofetch command
"""
if platform.system() != 'Windows':
full_cmd = ['/usr/bin/env', 'bash', get_command_path(), *shlex.split(args)]
bash = ['/usr/bin/env', 'bash'] if Path('/usr/bin/env').is_file() else [shutil.which('bash')]
full_cmd = [*bash, get_command_path(), *shlex.split(args)]

else:
cmd = get_command_path().replace("\\", "/").replace("C:/", "/c/")
Expand Down

0 comments on commit d41a302

Please sign in to comment.