diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py index c4b5b427ad0..b1d33eb67df 100644 --- a/lib/spack/spack/cmd/debug.py +++ b/lib/spack/spack/cmd/debug.py @@ -6,6 +6,7 @@ import os import platform import re +import sys from datetime import datetime from glob import glob @@ -62,9 +63,10 @@ def create_db_tarball(args): base = os.path.basename(str(spack.store.STORE.root)) transform_args = [] + # Currently --transform and -s are not supported by Windows native tar if "GNU" in tar("--version", output=str): transform_args = ["--transform", "s/^%s/%s/" % (base, tarball_name)] - else: + elif sys.platform != "win32": transform_args = ["-s", "/^%s/%s/" % (base, tarball_name)] wd = os.path.dirname(str(spack.store.STORE.root)) diff --git a/lib/spack/spack/test/cmd/debug.py b/lib/spack/spack/test/cmd/debug.py index 1d29f441681..55d0928fbde 100644 --- a/lib/spack/spack/test/cmd/debug.py +++ b/lib/spack/spack/test/cmd/debug.py @@ -16,8 +16,6 @@ debug = SpackCommand("debug") -pytestmark = pytest.mark.not_on_windows("does not run on windows") - @pytest.mark.db def test_create_db_tarball(tmpdir, database):