Skip to content

Commit

Permalink
feat: only specify master branch by default with migrate
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Lee Scott <pat@patscott.io>
  • Loading branch information
patrickleet committed Apr 28, 2021
1 parent ca5759b commit 8687d3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions bin/meta-project-migrate
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const run = ({ process }) => {
repoUrl,
dest,
gitExists,
branch: 'master',
});
}

Expand All @@ -156,6 +157,7 @@ const run = ({ process }) => {
repoUrl: rootRepo,
dest: tempDir,
gitExists,
branch: 'master',
});
};

Expand Down
6 changes: 3 additions & 3 deletions lib/gitClone.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const exec = require('meta-exec');

function gitClone({ cb, dest, repoUrl, gitExists, branch = "master" }) {
function gitClone({ cb, dest, repoUrl, gitExists, branch }) {
if (gitExists) {
console.log(`Found pre-existing git repository at ${dest}. Will not clone ${repoUrl}.`); // prettier-ignore
return cb();
}
console.log({ repoUrl, dest });
exec(
{
command: `git clone --branch ${branch} ${repoUrl} ${dest}`,
command: `git clone ${branch ? `--branch ${branch}` : ''} ${repoUrl} ${dest}`,
suppressLogging: false,
},
err => {
(err) => {
if (err) cb(err);
else return cb();
}
Expand Down

0 comments on commit 8687d3c

Please sign in to comment.