Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: cros_workon

Issue 3129008: cros_workon: check for existence of local manifest before cat (Closed) Base URL: ssh://gitrw.chromium.org/crosutils
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cros_workon
diff --git a/cros_workon b/cros_workon
index 9fb7c37bee63fd1de45469a5e1d550705539355b..d7ecc65d5d60410cdf78833f0a1e4168da7fb290 100755
--- a/cros_workon
+++ b/cros_workon
@@ -132,7 +132,8 @@ regen_manifest_and_sync() {
local_manifest="${REPODIR}/local_manifest.xml"
# preserve old manifest entries
- MANIFEST_ENTRIES_OLD=$(cat "${local_manifest}" | grep "^<project")
+ [ -f "${local_manifest}" ] && \
+ MANIFEST_ENTRIES_OLD=$(cat "${local_manifest}" | grep "^<project")
rm -f "${local_manifest}"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698