Skip to content

Commit

Permalink
Fixed an issue where chia services could not run in the background on…
Browse files Browse the repository at this point in the history
… macOS
  • Loading branch information
ChiaMineJP committed Sep 18, 2024
1 parent f24250a commit d631f4b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/gui/src/util/chiaEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,20 @@ const chiaInit = () => {
const startChiaDaemon = () => {
pyProc = null;

let procOption;
if (process.platform === 'darwin') {
procOption = {
detached: true,
windowsHide: true,
};
}

const chiaExec = getExecutablePath(PY_CHIA_EXEC);
console.info('Running python executable: ');
console.info(`Script: ${chiaExec} ${CHIA_START_ARGS.join(' ')}`);

try {
const Process = childProcess.spawn;
pyProc = new Process(chiaExec, CHIA_START_ARGS);
pyProc = childProcess.spawn(chiaExec, CHIA_START_ARGS, procOption);
} catch (e) {
console.error('Running python executable: Error: ');
console.error(e);
Expand Down

0 comments on commit d631f4b

Please sign in to comment.