Skip to content

Commit

Permalink
Don't set GC_DONT_GC at all when not disabling GC
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodywasishere committed May 16, 2024
1 parent 908766c commit 4df634b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ function execWrapper(
) => void
): ChildProcess {
const disable_gc = workspace.getConfiguration('crystal-lang').get<boolean>('disable-gc', false);
const env = { ...process.env, 'GC_DONT_GC': disable_gc ? '1' : '0' }
const env = { ...process.env }

if (disable_gc) {
env['GC_DONT_GC'] = '1'
}

const response = exec(command, { 'cwd': cwd, env }, (err, stdout, stderr) => {
if (err) {
Expand Down

0 comments on commit 4df634b

Please sign in to comment.