Skip to content

Commit

Permalink
Update Executable
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTheDev committed Jun 14, 2023
1 parent 7d971ae commit 695374f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
./releases/*
./SpritzTerminal/x64/*
./spritz-cl/target/*
/releases/*
/SpritzTerminal/x64/*
/SpritzTerminal/SpritzTerminal/x64/*
/SpritzTerminal/.vs/*
/spritz-cl/target/*
/spritz-cl/.idea/*
Binary file modified SpritzTerminal/.vs/SpritzTerminal/v16/.suo
Binary file not shown.
Binary file modified SpritzTerminal/.vs/SpritzTerminal/v16/Browse.VC.db
Binary file not shown.
13 changes: 11 additions & 2 deletions SpritzTerminal/SpritzTerminal/SpritzTerminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ int main(int argc, char *argv[])
{
bool foundJRE = false;

string path = std::getenv("PATH");

string path = "";
char* buf = nullptr;
size_t sz = 0;
if (_dupenv_s(&buf, &sz, "PATH") == 0 && buf != nullptr)
{
path = buf;
free(buf);
}
if (path.find("java") != std::string::npos) {
foundJRE = true;
}


if (!foundJRE) {
Expand Down

0 comments on commit 695374f

Please sign in to comment.