Skip to content

Commit 360bbc2

Browse files
committed
Test only unsetting DYLD_INSERT_BINARIES
1 parent 4e34dbb commit 360bbc2

6 files changed

Lines changed: 26 additions & 16 deletions

File tree

lib/environment.js

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

lib/environment.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.

lib/tracer-config.js

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

lib/tracer-config.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/environment.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export enum EnvVar {
2626
*/
2727
DISABLE_DUPLICATE_LOCATION_FIX = "CODEQL_ACTION_DISABLE_DUPLICATE_LOCATION_FIX",
2828

29+
DYLD_INSERT_BINARIES = "DYLD_INSERT_BINARIES",
30+
2931
/**
3032
* Whether the CodeQL Action is using its own deprecated and non-standard way of scanning for
3133
* multiple languages.

src/tracer-config.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { isTracedLanguage } from "./languages";
77
import { Logger } from "./logging";
88
import { ToolsFeature } from "./tools-features";
99
import { BuildMode } from "./util";
10+
import { EnvVar } from "./environment";
1011

1112
export type TracerConfig = {
1213
env: { [key: string]: string };
@@ -136,12 +137,14 @@ export async function getCombinedTracerConfig(
136137
* other system calls in this process.
137138
*/
138139
export function unsetTracerEnvVarsForCurrentProcess(): void {
139-
const tracerEnvVarNames: string[] = JSON.parse(
140-
process.env["CODEQL_ACTION_TRACER_ENV_VAR_NAMES"] ?? "null",
141-
);
142-
if (tracerEnvVarNames !== null) {
143-
for (const envVar of tracerEnvVarNames) {
144-
delete process.env[envVar];
145-
}
146-
}
140+
// const tracerEnvVarNames: string[] = JSON.parse(
141+
// process.env["CODEQL_ACTION_TRACER_ENV_VAR_NAMES"] ?? "null",
142+
// );
143+
// if (tracerEnvVarNames !== null) {
144+
// for (const envVar of tracerEnvVarNames) {
145+
// delete process.env[envVar];
146+
// }
147+
// }
148+
149+
delete process.env[EnvVar.DYLD_INSERT_BINARIES];
147150
}

0 commit comments

Comments
 (0)