Skip to content

Commit

Permalink
Add back commented out python tar commands
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Sep 14, 2024
1 parent c5ee0d1 commit 42fbc6c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { SetupTray } from './tray';
import { IPC_CHANNELS } from './constants';
import dotenv from 'dotenv';
import { app, BrowserWindow, webContents, screen } from 'electron';
import tar from 'tar';

// Handle creating/removing shortcuts on Windows when installing/uninstalling.
import('electron-squirrel-startup').then((ess) => {
const { default: check } = ess;
Expand Down Expand Up @@ -172,13 +174,13 @@ const launchPythonServer = async (args: {
pythonProcess = spawnPython(comfyMainCmd, path.dirname(scriptPath));
} catch {
console.log('Running one-time python installation on first startup...');
// clean up any possible existing non-functional python env
// try {
// await fsPromises.rm(pythonRootPath, {recursive: true});
// } catch {null;}
//clean up any possible existing non-functional python env
try {
await fsPromises.rm(pythonRootPath, {recursive: true});
} catch {null;}

// const pythonTarPath = path.join(appResourcesPath, 'python.tgz');
// await tar.extract({file: pythonTarPath, cwd: userResourcesPath, strict: true});
const pythonTarPath = path.join(appResourcesPath, 'python.tgz');
await tar.extract({file: pythonTarPath, cwd: userResourcesPath, strict: true});

const wheelsPath = path.join(pythonRootPath, 'wheels');
// TODO: report space bug to uv upstream, then revert below mac fix
Expand Down

0 comments on commit 42fbc6c

Please sign in to comment.