@@ -1739,7 +1739,7 @@ const core = __webpack_require__(276)
17391739
17401740const { execSync, getInput } = __webpack_require__ ( 498 )
17411741
1742- let mingw = getInput ( 'mingw' )
1742+ let mingw = getInput ( 'mingw' ) // only parsed for openssl
17431743let mswin = getInput ( 'mswin' )
17441744let choco = getInput ( 'choco' )
17451745let vcpkg = getInput ( 'vcpkg' )
@@ -1755,23 +1755,25 @@ const run = async () => {
17551755 }
17561756
17571757 if ( mingw . includes ( 'openssl' ) ) {
1758- execSync ( `choco install --no-progress openssl` )
1759- fs . renameSync ( 'C:\\Program Files\\OpenSSL-Win64' , 'C:\\openssl-win' )
1760- core . exportVariable ( 'SSL_DIR' , '--with-openssl-dir=C:/openssl-win' )
1761- choco = choco . replace ( / o p e n s s l / gi, '' ) . trim ( )
1758+ if ( ! choco . includes ( 'openssl' ) ) { choco += ' openssl' }
17621759 }
17631760
17641761 if ( choco !== '' ) {
17651762 execSync ( `choco install --no-progress ${ choco } ` )
17661763 if ( choco . includes ( 'openssl' ) ) {
17671764 fs . renameSync ( 'C:\\Program Files\\OpenSSL-Win64' , 'C:\\openssl-win' )
1768- core . exportVariable ( 'SSL_DIR' , '--with-openssl-dir=C:/ openssl-win' )
1765+ core . exportVariable ( 'SSL_DIR' , '--with-openssl-dir=C:\\ openssl-win' )
17691766 }
17701767 }
17711768
17721769 if ( vcpkg !== '' ) {
17731770 execSync ( `vcpkg --triplet x64-windows install ${ vcpkg } ` )
1774- core . exportVariable ( 'OPT_DIR' , `--with-opt-dir=${ process . env . VCPKG_INSTALLATION_ROOT } /installed/x64-windows` )
1771+ core . exportVariable ( 'OPT_DIR' , `--with-opt-dir=${ process . env . VCPKG_INSTALLATION_ROOT } \\installed\\x64-windows` )
1772+ const vcpkgTools = `${ process . env . VCPKG_INSTALLATION_ROOT } \\installed\\x64-windows\\tools`
1773+ if ( fs . existsSync ( vcpkgTools ) && fs . readdirSync ( vcpkgTools ) . length >= 0 ) {
1774+ core . addPath ( vcpkgTools )
1775+ console . log ( `Added to Path: ${ vcpkgTools } ` )
1776+ }
17751777 }
17761778
17771779 } catch ( error ) {
0 commit comments