Skip to content

Commit

Permalink
fix: add quotes to sys.argv
Browse files Browse the repository at this point in the history
  • Loading branch information
pradishb committed Apr 30, 2024
1 parent 4fde75b commit 77af139
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "yappr"
version = "1.0.4"
version = "1.0.5"
dependencies = []
requires-python = ">=3"
authors = [{ name = "Pradish Bijukchhe", email = "[email protected]" }]
Expand Down
8 changes: 5 additions & 3 deletions yappr/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import tkinter as tk
import traceback
from argparse import ArgumentParser
from pathlib import Path
from threading import Thread
from tkinter.messagebox import showerror # type: ignore
from typing import Any
Expand Down Expand Up @@ -48,8 +47,11 @@ def wrapped(*args: Param.args, **kwargs: Param.kwargs) -> None:
return

# if exit flag was set by updater
p = Path(sys.executable)
os.execl(p, p.stem, *sys.argv)
argv = sys.executable, *sys.argv
# add quotes to fix file not found
# error in windows
argv = ['"' + a + '"' for a in argv]
os.execl(sys.executable, *argv)
except Exception:
logger.exception("Unhandled Exception")
root = tk.Tk()
Expand Down

0 comments on commit 77af139

Please sign in to comment.