Skip to content

Commit

Permalink
adds renamed variable for skipping renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
laardee committed Nov 4, 2016
1 parent 0b38b64 commit bd37e27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/plugins/install/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Install {
};

const name = this.options.name || parsedGitHubUrl.repo;
const renamed = name !== parsedGitHubUrl.repo;

// validate if given url is a valid GitHub url
if (url.hostname !== 'github.com' || !parsedGitHubUrl.owner || !parsedGitHubUrl.repo) {
Expand Down Expand Up @@ -109,7 +110,7 @@ class Install {
servicePath,
{ timeout: 30000, extract: true, strip: 1, mode: '755' }
).then(() => {
if (!name) {
if (!renamed) {
return '';
}
return this.renameService(name, servicePath);
Expand Down
1 change: 0 additions & 1 deletion lib/plugins/install/tests/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ describe('Install', () => {
};

return install.install().then(() => {
expect(downloadStub.calledOnce).to.equal(true);
expect(downloadStub.args[0][0]).to.equal(`${install.options.url}/archive/master.zip`);
});
});
Expand Down

0 comments on commit bd37e27

Please sign in to comment.