Skip to content

Commit fbaa45f

Browse files
committed
mswin - use forward slashes for OPT_DIR and SSL_DIR
1 parent 8e3108e commit fbaa45f

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

dist/index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,12 @@ const setRuby = (_ruby) => {
624624

625625
const run = async () => {
626626
try {
627+
// 2020-04-01 setup-ruby sets ENV['MAKE'], not needed
627628
// rename files that cause build conflicts with MSYS2
628-
let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe']
629-
badFiles.forEach( (bad) => {
630-
if (fs.existsSync(bad)) { fs.renameSync(bad, `${bad}_`) }
631-
})
629+
// let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe']
630+
// badFiles.forEach( (bad) => {
631+
// if (fs.existsSync(bad)) { fs.renameSync(bad, `${bad}_`) }
632+
// })
632633

633634
if (mingw !== '' || msys2 !== '') {
634635
if (ruby.abiVers >= '2.4.0') {
@@ -1736,13 +1737,14 @@ const run = async () => {
17361737
execSync(`choco install --no-progress ${choco}`)
17371738
if (choco.includes('openssl')) {
17381739
fs.renameSync('C:\\Program Files\\OpenSSL-Win64', 'C:\\openssl-win')
1739-
core.exportVariable('SSL_DIR', '--with-openssl-dir=C:\\openssl-win')
1740+
core.exportVariable('SSL_DIR', '--with-openssl-dir=C:/openssl-win')
17401741
}
17411742
}
17421743

17431744
if (vcpkg !== '') {
17441745
execSync(`vcpkg --triplet x64-windows install ${vcpkg}`)
1745-
core.exportVariable('OPT_DIR', `--with-opt-dir=${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows`)
1746+
const vcpkgRoot = process.env.VCPKG_INSTALLATION_ROOT.replace(/\\/g, '/')
1747+
core.exportVariable('OPT_DIR', `--with-opt-dir=${vcpkgRoot}/installed/x64-windows`)
17461748
const vcpkgTools = `${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows\\tools`
17471749
if (fs.existsSync(vcpkgTools) && fs.readdirSync(vcpkgTools).length >= 0) {
17481750
core.addPath(vcpkgTools)

mingw.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ export const setRuby = (_ruby) => {
163163

164164
export const run = async () => {
165165
try {
166+
// 2020-04-01 setup-ruby sets ENV['MAKE'], not needed
166167
// rename files that cause build conflicts with MSYS2
167-
let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe']
168+
// let badFiles = ['C:\\Strawberry\\c\\bin\\gmake.exe']
168169
// badFiles.forEach( (bad) => {
169170
// if (fs.existsSync(bad)) { fs.renameSync(bad, `${bad}_`) }
170171
// })

mswin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ export const run = async () => {
3232
execSync(`choco install --no-progress ${choco}`)
3333
if (choco.includes('openssl')) {
3434
fs.renameSync('C:\\Program Files\\OpenSSL-Win64', 'C:\\openssl-win')
35-
core.exportVariable('SSL_DIR', '--with-openssl-dir=C:\\openssl-win')
35+
core.exportVariable('SSL_DIR', '--with-openssl-dir=C:/openssl-win')
3636
}
3737
}
3838

3939
if (vcpkg !== '') {
4040
execSync(`vcpkg --triplet x64-windows install ${vcpkg}`)
41-
core.exportVariable('OPT_DIR', `--with-opt-dir=${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows`)
41+
const vcpkgRoot = process.env.VCPKG_INSTALLATION_ROOT.replace(/\\/g, '/')
42+
core.exportVariable('OPT_DIR', `--with-opt-dir=${vcpkgRoot}/installed/x64-windows`)
4243
const vcpkgTools = `${process.env.VCPKG_INSTALLATION_ROOT}\\installed\\x64-windows\\tools`
4344
if (fs.existsSync(vcpkgTools) && fs.readdirSync(vcpkgTools).length >= 0) {
4445
core.addPath(vcpkgTools)

0 commit comments

Comments
 (0)