Skip to content

Commit 4df634b

Browse files
Don't set GC_DONT_GC at all when not disabling GC
1 parent 908766c commit 4df634b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ function execWrapper(
3434
) => void
3535
): ChildProcess {
3636
const disable_gc = workspace.getConfiguration('crystal-lang').get<boolean>('disable-gc', false);
37-
const env = { ...process.env, 'GC_DONT_GC': disable_gc ? '1' : '0' }
37+
const env = { ...process.env }
38+
39+
if (disable_gc) {
40+
env['GC_DONT_GC'] = '1'
41+
}
3842

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

0 commit comments

Comments
 (0)