Skip to content

Commit

Permalink
[F] Properly escape path #89
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Feb 8, 2023
1 parent 6302ccb commit 2860c1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hyfetch/neofetch_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,13 @@ def run_neofetch_cmd(args: str, pipe: bool = False) -> str | None:
Run neofetch command
"""
if platform.system() != 'Windows':
full_cmd = shlex.split(f'/usr/bin/env bash {get_command_path()} {args}')
full_cmd = ['/usr/bin/env', 'bash', get_command_path(), *shlex.split(args)]

else:
cmd = get_command_path().replace("\\", "/").replace("C:/", "/c/")
args = args.replace('\\', '/').replace('C:/', '/c/')

full_cmd = [ensure_git_bash(), '-c', f'{cmd} {args}']
full_cmd = [ensure_git_bash(), '-c', f"'{cmd}' {args}"]
# print(full_cmd)

if pipe:
Expand Down

0 comments on commit 2860c1e

Please sign in to comment.