Do not render unnecessary arguments to the console.
When build dependencies were stale, this incorrect message was shown:
```
Build deps are stale. Please run tools/install-build-deps
/Users/octaviant/Development/perfetto/out/ui/.check_deps --ui
```
Instead of:
```
Build deps are stale. Please run tools/install-build-deps --ui
```
Change-Id: I0519659c2ee49d4b5083fcfabe3b7eef2d15d400
diff --git a/tools/install-build-deps b/tools/install-build-deps
index 40a1501..19626ac 100755
--- a/tools/install-build-deps
+++ b/tools/install-build-deps
@@ -580,7 +580,7 @@
with open(args.check_only, 'w') as f:
f.write('OK') # The content is irrelevant, just keep GN happy.
return 0
- argz = ' '.join([x for x in sys.argv[1:] if '--check-only' not in x])
+ argz = ' '.join([x for x in sys.argv[1:] if not x.startswith('--check-only')])
print('\033[91mBuild deps are stale. ' +
'Please run tools/install-build-deps %s\033[0m' % argz)
return 1
diff --git a/ui/build.js b/ui/build.js
index 9d1a7f5..28f0456 100644
--- a/ui/build.js
+++ b/ui/build.js
@@ -159,7 +159,8 @@
// Check that deps are current before starting.
const installBuildDeps = pjoin(ROOT_DIR, 'tools/install-build-deps');
- const depsArgs = ['--check-only', pjoin(cfg.outDir, '.check_deps'), '--ui'];
+ const checkDepsPath = pjoin(cfg.outDir, '.check_deps');
+ const depsArgs = [`--check-only=${checkDepsPath}`, '--ui'];
exec(installBuildDeps, depsArgs);
console.log('Entering', cfg.outDir);