summaryrefslogtreecommitdiff
path: root/mach
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2017-08-28 16:09:23 +1000
committerMartin Thomson <martin.thomson@gmail.com>2017-08-28 16:09:23 +1000
commitf486f08efacdbb37b85b59610f6b864e6b695937 (patch)
treecc6d54db5f8dfe87c3a5d4c7a1ce1ec78731803f /mach
parentf4cff777c106e7d2ee2bf8f115f4a86e656e351f (diff)
downloadnss-hg-f486f08efacdbb37b85b59610f6b864e6b695937.tar.gz
Bug 1392504 - Fix mach clang-format when run outside the root, r=franziskus
Diffstat (limited to 'mach')
-rwxr-xr-xmach5
1 files changed, 2 insertions, 3 deletions
diff --git a/mach b/mach
index 2620d134e..715f1a9e3 100755
--- a/mach
+++ b/mach
@@ -27,11 +27,10 @@ class cfAction(argparse.Action):
self.setDockerCommand()
if values:
- files = [os.path.abspath(x) for x in values]
+ files = [os.path.relpath(os.path.abspath(x), start=cwd) for x in values]
else:
files = self.modifiedFiles()
- files = [os.path.join('/home/worker/nss', os.path.relpath(x, start=cwd))
- for x in files]
+ files = [os.path.join('/home/worker/nss', x) for x in files]
# First check if we can run docker.
try: