Bug 1429342 - Ignore mach file-info arguments that don't resolve to paths; r=froydnj

Without this, e.g. `mach file-info bugzilla-component build/does-not-exist`
reports the bug component is `Core :: Build Config`. Because paths
in CI have `build/` prefixes, people were typing `build/` paths into
`mach file-info` and reporting bugs against `Core :: Build Config`.

MozReview-Commit-ID: 8Zp6cnuw0Sh

--HG--
extra : rebase_source : 0b0e3d3247dc00681f62c5d43f8a1535f9f04738
This commit is contained in:
Gregory Szorc 2018-01-16 16:40:30 -08:00
parent 5b9b45cdbc
commit 0ec82b74be

View File

@ -305,6 +305,11 @@ class MozbuildFileCommands(MachCommandBase):
for p in relpaths:
if '*' not in p:
if p not in all_paths_set:
if not os.path.exists(mozpath.join(self.topsrcdir, p)):
print('(%s does not exist; ignoring)' % p,
file=sys.stderr)
continue
all_paths_set.add(p)
allpaths.append(p)
continue