Skip to content

Commit 4e37d56

Browse files
ErisDSacburdine
authored andcommitted
fix(help): remove dupe alias of check-mem in install
- when running ghost install --help the mem-check alias was appearing twice - this is because the doctor options are loaded twice, once in start under setup, and once directly in install - removing this extra load fixes the issue because aliases are additive
1 parent 84f9012 commit 4e37d56

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

lib/commands/install.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class InstallCommand extends Command {
99
static configureOptions(commandName, yargs, extensions) {
1010
yargs = super.configureOptions(commandName, yargs, extensions);
1111
yargs = SetupCommand.configureOptions('setup', yargs, extensions, true);
12-
yargs = DoctorCommand.configureOptions('doctor', yargs, extensions, true);
1312

1413
return yargs;
1514
}

test/unit/commands/install-spec.js

-4
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ describe('Unit: Commands > Install', function () {
1212
it('configureOptions adds setup & doctor options', function () {
1313
const superStub = sinon.stub().returnsArg(1);
1414
const setupStub = sinon.stub().returnsArg(1);
15-
const doctorStub = sinon.stub().returnsArg(1);
1615

1716
// Needed for extension
1817
class Command {}
1918
Command.configureOptions = superStub;
2019

2120
const InstallCommand = proxyquire(modulePath, {
2221
'./setup': {configureOptions: setupStub},
23-
'./doctor': {configureOptions: doctorStub},
2422
'../command': Command
2523
});
2624

@@ -30,8 +28,6 @@ describe('Unit: Commands > Install', function () {
3028
expect(superStub.calledWithExactly('install', {yargs: true}, [{extensiona: true}])).to.be.true;
3129
expect(setupStub.calledOnce).to.be.true;
3230
expect(setupStub.calledWithExactly('setup', {yargs: true}, [{extensiona: true}], true)).to.be.true;
33-
expect(doctorStub.calledOnce).to.be.true;
34-
expect(doctorStub.calledWithExactly('doctor', {yargs: true}, [{extensiona: true}], true)).to.be.true;
3531
});
3632

3733
describe('run', function () {

0 commit comments

Comments
 (0)