Skip to content

Commit 1674e7e

Browse files
committed
fix: use correct task function property in pre-checks
no issue - isEnabled is not the correct property name, enabled is
1 parent e9e640f commit 1674e7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/utils/pre-checks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function preChecks(ui, system) {
4141
return ui.sudo(`chown -R ${USER}:${USER} ${configstore}`);
4242
});
4343
},
44-
isEnabled: () => system.platform.linux
44+
enabled: () => system.platform.linux
4545
}];
4646

4747
return ui.listr(tasks, {}, {clearOnSuccess: true});

test/unit/utils/pre-checks-spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('Unit: Utils > pre-checks', function () {
8989

9090
getTasks({}, {}, {platform: {linux: true}}).then(([,task]) => {
9191
expect(task.title).to.equal('Ensuring correct ~/.config folder ownership');
92-
expect(task.isEnabled()).to.be.true;
92+
expect(task.enabled()).to.be.true;
9393
return task.task();
9494
}).catch((error) => {
9595
expect(error.message).to.equal('test error');
@@ -108,7 +108,7 @@ describe('Unit: Utils > pre-checks', function () {
108108
const sudo = sinon.stub().resolves();
109109

110110
return getTasks({}, {sudo}, {platform: {linux: false}}).then(([,task]) => {
111-
expect(task.isEnabled()).to.be.false;
111+
expect(task.enabled()).to.be.false;
112112
return task.task();
113113
}).then(() => {
114114
expect(uid.calledOnce).to.be.true;

0 commit comments

Comments
 (0)