1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-05-06 06:54:47 +00:00

Merge pull request #773 from FunkinCrew/process-cleanup

close sys.io.Process stuff when we're done with them
This commit is contained in:
Cameron Taylor 2024-09-20 00:24:10 -04:00 committed by GitHub
commit e3a13bee8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -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;
}

View file

@ -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)
{