Skip to content

Commit 0ba3f76

Browse files
committed
Update install.js
removes the deprecated win32 installer to avoid type errors
1 parent eee7bf8 commit 0ba3f76

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

shared/commands/install.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const { loadOsModule } = require('../helpers/load-os-module');
3+
const { install } = require('../install/macos');
44

55
module.exports = /** @type {import('yargs').CommandModule} */ ({
66
command: 'install',
@@ -12,12 +12,8 @@ module.exports = /** @type {import('yargs').CommandModule} */ ({
1212
});
1313
},
1414
async handler({ unattended }) {
15-
const installDelegate = loadOsModule('install', {
16-
darwin: () => require('../install/macos'),
17-
win32: () => require('../install/win32'),
18-
});
19-
await installDelegate.install({ unattended });
20-
21-
console.log('Installation completed successfully.');
15+
const installed = await install({ unattended });
16+
const result = installed ? 'Installation completed successfully.' : 'Already installed';
17+
console.log(result);
2218
},
2319
});

0 commit comments

Comments
 (0)