phase1: don't fail if Git is not yet cloned
[buildbot.git] / phase1 / master.cfg
index e44535930f13af4cb66ec6d9251652d31a6753c6..12f73932f3da0d93ec3b57e72ababba0c5bf3dec 100644 (file)
@@ -316,7 +316,7 @@ for target in targets:
        factory.addStep(ShellCommand(
                name = "switchbranch",
                description = "Checking out Git branch",
-               command = ["git", "checkout", repo_branch],
+               command = "if [ -d .git ]; then git checkout '%s'; else exit 0; fi" % repo_branch,
                haltOnFailure = True,
                doStepIf = IsNoTaggingRequested
        ))