From 94e3ee6d7acc8a7977f04e6b953bf33ebf84cfd6 Mon Sep 17 00:00:00 2001 From: "Sergey E. Koposov" Date: Tue, 26 Dec 2023 15:09:13 +0000 Subject: [PATCH] deal with windows specifics --- py/minimint/mist_interpolator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py/minimint/mist_interpolator.py b/py/minimint/mist_interpolator.py index 1068db7..96c7f05 100644 --- a/py/minimint/mist_interpolator.py +++ b/py/minimint/mist_interpolator.py @@ -164,7 +164,11 @@ def writer(url, pref): fdout.close() fd.close() cmd = 'cd %s; tar xfJ %s' % (pref, fname) - os.system(cmd) + if os.name == 'nt': + cmd = 'cd %s ; tar.exe xFJ %s' % (pref, fname) + status = os.system(cmd) + if status != 0: + raise RuntimeError('Failed to untar the files') with tempfile.TemporaryDirectory(dir=tmp_prefix) as T: for curfilt in filters: