Skip to content

Commit

Permalink
fix(origin): used ssh-url
Browse files Browse the repository at this point in the history
instead of the ssl-url typo

for travi/github-scaffolder#1
  • Loading branch information
travi committed Feb 4, 2019
1 parent 255a071 commit 9cf9b60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/vcs/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ function generateConfigFiles(projectRoot, ignore) {
}

async function defineRemoteOrigin(projectRoot, origin) {
if (origin.sslUrl) {
console.log(chalk.grey(`Setting remote origin to ${origin.sslUrl}`)); // eslint-disable-line no-console
if (origin.sshUrl) {
console.log(chalk.grey(`Setting remote origin to ${origin.sshUrl}`)); // eslint-disable-line no-console

await gitRemote.create(await gitRepository.open(projectRoot), 'origin', origin.sslUrl);
await gitRemote.create(await gitRepository.open(projectRoot), 'origin', origin.sshUrl);
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/unit/vcs/git-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ suite('scaffold git', () => {

test('that the remote origin is defined when an ssl-url is provided for the remote', async () => {
const repository = any.simpleObject();
const sslUrl = any.url();
const sshUrl = any.url();
gitRepository.open.withArgs(projectRoot).resolves(repository);
gitRemote.create.resolves();

await scaffold({projectRoot, origin: {sslUrl}});
await scaffold({projectRoot, origin: {sshUrl}});

assert.calledWith(gitRemote.create, repository, 'origin', sslUrl);
assert.calledWith(gitRemote.create, repository, 'origin', sshUrl);
});
});
});

0 comments on commit 9cf9b60

Please sign in to comment.