File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class CDKInstall extends InstallableItem {
3030 let ocExe ;
3131 let ocExePattern = Platform . OS === 'win32' ? '/**/oc.exe' : '/**/oc' ;
3232 let home ;
33+ let driverName = 'virtualbox' ;
3334 return Promise . resolve ( ) . then ( ( ) => {
3435 if ( this . downloadedFile . endsWith ( '.exe' ) || path . parse ( this . downloadedFile ) . ext == '' ) {
3536 return installer . copyFile ( this . downloadedFile , minishiftExe ) ;
@@ -38,11 +39,16 @@ class CDKInstall extends InstallableItem {
3839 } ) . then ( ( ) => {
3940 return Platform . makeFileExecutable ( minishiftExe ) ;
4041 } ) . then ( ( ) => {
41- let driverName = 'virtualbox' ;
4242 let hv = this . installerDataSvc . getInstallable ( 'hyperv' ) ;
4343 if ( hv && hv . hasOption ( 'detected' ) ) {
4444 driverName = 'hyperv' ;
4545 }
46+ return Promise . resolve ( driverName ) ;
47+ } ) . then ( ( ) => {
48+ return installer . exec (
49+ 'net localgroup "Hyper-V Administrators" %USERDOMAIN%\\%USERNAME% /add'
50+ ) . catch ( ( ) => Promise . resolve ( ) ) ;
51+ } ) . then ( ( ) => {
4652 return installer . exec ( `${ minishiftExe } setup-cdk --force --default-vm-driver=${ driverName } ` , this . createEnvironment ( ) ) ;
4753 } ) . then ( ( ) => {
4854 return Platform . getUserHomePath ( ) ;
You can’t perform that action at this time.
0 commit comments