Skip to content

Commit 0a30f04

Browse files
author
Simeon Kummer
committed
fix minecraft hiding via --noconsole
1 parent 3652de1 commit 0a30f04

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/pythonbuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: pip install minecraft-launcher-lib==7.1
2828

2929
- name: Build executable with PyInstaller
30-
run: pyinstaller -y --onefile --name os launch.py
30+
run: pyinstaller -y --onefile --name os launch.py --noconsole
3131

3232
- name: Upload executable
3333
uses: actions/upload-artifact@v4

src/minecraftStarter.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,7 @@ class MinecraftStarter {
334334
detached: true
335335
};
336336

337-
// On Windows, prevent cmd window from showing without hiding Minecraft
338-
if (process.platform === 'win32') {
339-
spawnOptions.shell = false; // Don't use shell, prevents cmd window
340-
spawnOptions.stdio = ['ignore', 'ignore', 'ignore']; // Suppress stdio but allow windows
341-
} else {
342-
spawnOptions.stdio = 'inherit';
343-
}
337+
spawnOptions.stdio = 'inherit';
344338

345339
// Spawn the process
346340
const process = spawn(args[0], args.slice(1), spawnOptions);

0 commit comments

Comments
 (0)