From 472d41a893a3610ff6935844ecb50d44949e1851 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 18 Sep 2024 16:15:10 -0400 Subject: [PATCH] close sys.io.Process stuff when we're done with them --- project.hxp | 6 ++++++ source/funkin/util/macro/GitCommit.hx | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/project.hxp b/project.hxp index 1193a9cd4..ac047ff91 100644 --- a/project.hxp +++ b/project.hxp @@ -941,6 +941,8 @@ class Project extends HXProject { var commitHash:String = process.stdout.readLine(); var commitHashSplice:String = commitHash.substr(0, 7); + process.close(); + return commitHashSplice; } @@ -955,6 +957,8 @@ class Project extends HXProject { var branchName:String = branchProcess.stdout.readLine(); + branchProcess.close(); + return branchName; } @@ -979,6 +983,8 @@ class Project extends HXProject { } } + branchProcess.close(); + return output.length > 0; } diff --git a/source/funkin/util/macro/GitCommit.hx b/source/funkin/util/macro/GitCommit.hx index 161856caa..9e3305c41 100644 --- a/source/funkin/util/macro/GitCommit.hx +++ b/source/funkin/util/macro/GitCommit.hx @@ -23,6 +23,8 @@ class GitCommit var commitHash:String = process.stdout.readLine(); var commitHashSplice:String = commitHash.substr(0, 7); + process.close(); + trace('Git Commit ID: ${commitHashSplice}'); // Generates a string expression @@ -52,6 +54,7 @@ class GitCommit } var branchName:String = branchProcess.stdout.readLine(); + branchProcess.close(); trace('Git Branch Name: ${branchName}'); // Generates a string expression @@ -84,6 +87,7 @@ class GitCommit try { output = branchProcess.stdout.readLine(); + branchProcess.close(); } catch (e) {