File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3- const { loadOsModule } = require ( '../helpers/load-os-module ' ) ;
3+ const { install } = require ( '../install/macos ' ) ;
44
55module . 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} ) ;
You can’t perform that action at this time.
0 commit comments