changeset 43982:bd3fa45c0662

run-tests: ensure the script exits when it fails to change directories Caught by PyCharm as an unused variable assignment. This regressed in c496e8c14b9e. Differential Revision: https://phab.mercurial-scm.org/D7750
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Dec 2019 16:57:28 -0500
parents 414cb20e241e
children 236cec445be2
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri Dec 27 16:30:14 2019 -0500
+++ b/tests/run-tests.py	Fri Dec 27 16:57:28 2019 -0500
@@ -1839,7 +1839,7 @@
                 cmd = rawcmd.split()
                 toggletrace(rawcmd)
                 if len(cmd) == 2 and cmd[0] == b'cd':
-                    l = b'  $ cd %s || exit 1\n' % cmd[1]
+                    rawcmd = b'cd %s || exit 1\n' % cmd[1]
                 script.append(rawcmd)
             elif l.startswith(b'  > '):  # continuations
                 after.setdefault(prepos, []).append(l)