Skip to content

Commit

Permalink
fixes #446 freebsd issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewAnnex committed Apr 27, 2022
1 parent 6c3a70d commit 2ae151b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion get_spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ def _unpack(self):
with ZipFile(self._local, "r") as archive:
archive.extractall(self._root)
else:
cmd = "gunzip | tar xC " + self._root
cmd = (
f"gunzip | tar {'xfC -' if host_OS == 'FreeBSD' else 'xC'} {self._root}"
)
proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE)
proc.stdin.write(self._local.read())
self._local.close()
Expand Down

0 comments on commit 2ae151b

Please sign in to comment.