Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python .../venv/bin/chia -> .../venv/bin/chia #2311

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions packages/gui/src/util/chiaEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const PY_DIST_EXECUTABLE = 'chia';
const PY_DIST_EXEC_ARGS = Object.freeze(['start', 'daemon']);

const PY_DEV_EXECUTABLE = `../../../venv/${process.platform === 'win32' ? 'Scripts/chia.exe' : 'bin/chia'}`;
const PY_DEV_EXEC_ARGS = Object.freeze([PY_DEV_EXECUTABLE, 'start', 'daemon']);
const PY_DEV_EXEC_ARGS = Object.freeze(['start', 'daemon']);

let pyProc = null;
let haveCert = null;
Expand Down Expand Up @@ -68,20 +68,26 @@ const startChiaDaemon = () => {
if (guessPackaged()) {
const executablePath = getExecutablePath(PY_DIST_EXECUTABLE);
console.info('Running python executable: ');
console.info(`Script: ${executablePath} ${PY_DIST_EXEC_ARGS.join(' ')}`);

try {
const Process = childProcess.spawn;
pyProc = new Process(executablePath, PY_DIST_EXEC_ARGS);
} catch (e) {
console.info('Running python executable: Error: ');
console.info(`Script: ${executablePath} ${PY_DIST_EXEC_ARGS.join(' ')}`);
console.error('Running python executable: Error: ');
console.error(e);
}
} else {
console.info('Running python script');
console.info(`Script: python ${PY_DEV_EXEC_ARGS.join(' ')}`);
console.info(`Script: ${PY_DEV_EXECUTABLE} ${PY_DEV_EXEC_ARGS.join(' ')}`);

const Process = childProcess.spawn;
pyProc = new Process('python', PY_DEV_EXEC_ARGS);
try {
const Process = childProcess.spawn;
pyProc = new Process(PY_DEV_EXECUTABLE, PY_DEV_EXEC_ARGS);
} catch (e) {
console.error('Running python script: Error: ');
console.error(e);
}
}

if (!pyProc) {
Expand Down
Loading