Skip to content

Commit 0d08440

Browse files
hsbtclaude
andcommitted
Add the vcpkg bin directory to PATH on mswin
The mswin Ruby ships z.dll, not the libz.dll that vcpkg's libz.lib imports, so a zlib extension built against vcpkg failed to load and then broke RubyGems in that gem home. The other vcpkg DLLs still resolve to the copies in Ruby's own bin first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 442b527 commit 0d08440

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎dist/index.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎windows.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ async function installVCPKG(url) {
227227
return exportCommandEnv(`set "MAKE=nmake" && "${vcVars}"`)
228228
})
229229

230+
const vcpkgDir = `${extractPath}\\installed\\${os.arch()}-windows`
230231
await core.group('Setting up vcpkg', async () => {
231232
// mswin Rubies do not record the vcpkg location in configure_args, so the compiler and linker find it through INCLUDE and LIB
232-
const vcpkgDir = `${extractPath}\\installed\\${os.arch()}-windows`
233233
exportEnv({
234234
INCLUDE: `${vcpkgDir}\\include;${process.env.INCLUDE}`,
235235
LIB: `${vcpkgDir}\\lib;${process.env.LIB}`
@@ -242,7 +242,7 @@ async function installVCPKG(url) {
242242
})
243243
})
244244

245-
return paths
245+
return [...paths, `${vcpkgDir}\\bin`]
246246
}
247247

248248
// Run a cmd command, export its environment, and return new paths

0 commit comments

Comments
 (0)