From c957ab0446c0d3b1c3cee3ff1ffbbc2a0696543a Mon Sep 17 00:00:00 2001 From: nerdvegas Date: Tue, 12 Oct 2021 20:02:50 +1100 Subject: [PATCH] fix regression in v2.94.0 wrt windows string escape on rxt command --- src/rez/tests/test_shells.py | 5 ++++- src/rez/utils/_version.py | 2 +- src/rezplugins/shell/cmd.py | 8 ++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/rez/tests/test_shells.py b/src/rez/tests/test_shells.py index f6db1f325..dc7ea8843 100644 --- a/src/rez/tests/test_shells.py +++ b/src/rez/tests/test_shells.py @@ -181,7 +181,10 @@ def test_rcfile(self): self.assertEqual(_stdout(p), "Hello Rez World!") os.remove(path) - # TODO get these shells working again + # TODO fix cmd shell command string escape + # as per https://github.com/nerdvegas/rez/pull/1130, then remove this + # exclusion + # @per_available_shell(exclude=["cmd"]) @install_dependent() def test_rez_env_output(self): diff --git a/src/rez/utils/_version.py b/src/rez/utils/_version.py index d63141ca3..4ab9206cc 100644 --- a/src/rez/utils/_version.py +++ b/src/rez/utils/_version.py @@ -1,7 +1,7 @@ # Update this value to version up Rez. Do not place anything else in this file. -_rez_version = "2.95.2" +_rez_version = "2.95.3" # Copyright 2013-2016 Allan Johns. diff --git a/src/rezplugins/shell/cmd.py b/src/rezplugins/shell/cmd.py index 8b5e846c2..b2ac8a8e3 100644 --- a/src/rezplugins/shell/cmd.py +++ b/src/rezplugins/shell/cmd.py @@ -354,8 +354,12 @@ def get_all_key_tokens(cls, key): @classmethod def join(cls, command): - inst = cls() - return ' '.join(inst.escape_string(x) for x in command) + # TODO: This needs to be properly fixed, see other shell impls + # at https://github.com/nerdvegas/rez/pull/1130 + # + # TODO: This may disappear in future [1] + # [1] https://bugs.python.org/issue10838 + return subprocess.list2cmdline(command) @classmethod def line_terminator(cls):