From cb4e562b6cb4384536acbdc81cc92dc105ce25c3 Mon Sep 17 00:00:00 2001 From: Chris Manchester Date: Thu, 17 Dec 2015 12:38:32 -0800 Subject: [PATCH] Bug 1233506 - Only accept positional arguments to mach try that are directories. r=jgraham --- testing/mach_commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/mach_commands.py b/testing/mach_commands.py index f1cabf0d4e6..013c2dc4161 100644 --- a/testing/mach_commands.py +++ b/testing/mach_commands.py @@ -533,9 +533,9 @@ class PushToTry(MachCommandBase): paths = [] for p in kwargs["paths"]: p = os.path.normpath(os.path.abspath(p)) - if not p.startswith(self.topsrcdir): - print('Specified path "%s" is outside of the srcdir, unable to' - ' specify tests outside of the srcdir' % p) + if not (os.path.isdir(p) and p.startswith(self.topsrcdir)): + print('Specified path "%s" is not a directory under the srcdir,' + ' unable to specify tests outside of the srcdir' % p) sys.exit(1) if len(p) <= len(self.topsrcdir): print('Specified path "%s" is at the top of the srcdir and would'