Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
geigerzaehler committed Apr 1, 2024
1 parent 575c43f commit 8417572
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,15 @@ def shutdown(self, wait=True):


def convert_command(tag: str) -> str:
match platform.system():
case "Windows":
return (
'powershell -Command "'
"Copy-Item -Path '$source' -Destination '$dest' -NoNewline;"
f"Add-Content -Path '$dest' -Value {tag}"
'"'
)
case "Linux":
return f"bash -c\" cp '$source' '$dest'; printf {tag} >> '$dest' \""
case system:
raise Exception(f"Unsupported system: {system}")
system = platform.system()
if system == "Window":
return (
'powershell -Command "'
"Copy-Item -Path '$source' -Destination '$dest' -NoNewline;"
f"Add-Content -Path '$dest' -Value {tag}"
'"'
)
elif system == "Linux":
return f"bash -c\" cp '$source' '$dest'; printf {tag} >> '$dest' \""
else:
raise Exception(f"Unsupported system: {system}")

0 comments on commit 8417572

Please sign in to comment.