From 54b670ba01eb6b0c3e6c39b61da5a820325de3d6 Mon Sep 17 00:00:00 2001 From: Martin Benonisen Date: Thu, 20 Jun 2013 15:42:24 +0200 Subject: [PATCH] Tilde char works in CLI. Fixes bug 874476 --- mozrunner/mozrunner/runner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mozrunner/mozrunner/runner.py b/mozrunner/mozrunner/runner.py index bb67c16..673efe4 100755 --- a/mozrunner/mozrunner/runner.py +++ b/mozrunner/mozrunner/runner.py @@ -103,13 +103,15 @@ def __init__(self, profile, binary, cmdargs=None, env=None, info['CFBundleExecutable']) self.cmdargs = cmdargs or [] - _cmdargs = [i for i in self.cmdargs + # '~' should be expanded; see + # - https://bugzilla.mozilla.org/show_bug.cgi?id=874476 + _cmdargs = [os.path.expanduser(i) for i in self.cmdargs if i != '-foreground'] + self.cmdargs = _cmdargs if len(_cmdargs) != len(self.cmdargs): # foreground should be last; see # - https://bugzilla.mozilla.org/show_bug.cgi?id=625614 # - https://bugzilla.mozilla.org/show_bug.cgi?id=626826 - self.cmdargs = _cmdargs self.cmdargs.append('-foreground') # process environment