Skip to content

Commit

Permalink
Raise error if branch is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
cdupuis committed Sep 6, 2018
1 parent 74a7e1d commit ad35f1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api-helper/project/cloningProjectLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import { ProjectLoader } from "../../spi/project/ProjectLoader";
*/
export const CloningProjectLoader: ProjectLoader = {
async doWithProject(coords, action) {
// This is breaking old internal code but we need the branch, so this error gives us an opportunity
// to fix all lingering cloning issues
if (!coords.id.branch) {
throw new Error(`Repository reference '${JSON.stringify(coords.id)}' is missing required branch`);
}
const p = await GitCommandGitProject.cloned(coords.credentials, coords.id, { depth: coords.depth });
return action(p);
},
Expand Down

0 comments on commit ad35f1c

Please sign in to comment.