Skip to content

Commit 3eb3fc1

Browse files
committed
fix: only escape LDFLAGS and CPPFLAGS
This partially reverts 41d161c
1 parent 4109838 commit 3eb3fc1

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/llvm/llvm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ export async function activateLLVM(directory: string, versionGiven: string) {
317317
}
318318
}
319319

320-
addEnv("LDFLAGS", `-L${directory}/lib`)
321-
addEnv("CPPFLAGS", `-I${directory}/include`)
320+
addEnv("LDFLAGS", `-L${directory}/lib`, true)
321+
addEnv("CPPFLAGS", `-I${directory}/include`, true)
322322

323323
addEnv("CC", `${directory}/bin/clang`)
324324
addEnv("CXX", `${directory}/bin/clang++`)

src/utils/env/addEnv.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { delimiter } from "path"
88
import { escapeSpace } from "../path/escape_space"
99

1010
/** An add path function that works locally or inside GitHub Actions */
11-
export function addEnv(name: string, valGiven: string | undefined, shouldEscapeSpace: boolean = true) {
11+
export function addEnv(name: string, valGiven: string | undefined, shouldEscapeSpace: boolean = false) {
1212
const val = shouldEscapeSpace ? escapeSpace(valGiven) : valGiven
1313
try {
1414
if (isGitHubCI()) {
@@ -28,8 +28,7 @@ export function addEnv(name: string, valGiven: string | undefined, shouldEscapeS
2828
}
2929

3030
/** An add path function that works locally or inside GitHub Actions */
31-
export function addPath(pathGiven: string, shouldEscapeSpace: boolean = true) {
32-
const path = shouldEscapeSpace ? escapeSpace(pathGiven) : pathGiven
31+
export function addPath(path: string) {
3332
process.env.PATH = `${path}${delimiter}${process.env.PATH}`
3433
try {
3534
if (isGitHubCI()) {

0 commit comments

Comments
 (0)