Skip to content

Commit

Permalink
fix: Fix Auto Updater
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark committed May 9, 2024
1 parent 836d36b commit ebea523
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/tosu/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { InstanceManager } from './objects/instanceManager/instanceManager';

const { update } = argumetsParser(process.argv);

const isDev = process.env.NODE_ENV !== 'development';
const isDev = process.env.NODE_ENV === 'development';
const isUpdateArg = (update !== null && update === true) || update === null;
const isConfigUpdate = config.enableAutoUpdate === true;
if (isDev && isUpdateArg && isConfigUpdate) {
if ((isDev === false && isConfigUpdate) || isUpdateArg) {
await autoUpdater();
} else {
await checkUpdates();
Expand Down
2 changes: 1 addition & 1 deletion packages/updater/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const autoUpdater = async () => {

wLogger.info('Restarting program');

spawn(process.argv[0], process.argv.slice(1), {
spawn(`"${process.argv[0]}"`, process.argv.slice(1), {
detached: true,
shell: true,
stdio: 'ignore'
Expand Down

0 comments on commit ebea523

Please sign in to comment.