From f1d6e154f9dbfbcb613589b8019aa38991b6c9d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90=D0=B1?= =?UTF-8?q?=D0=B4=D1=80=D0=B0=D1=85=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2?= <565963@gmail.com> Date: Wed, 9 Oct 2024 16:10:15 +0300 Subject: [PATCH] refactor: joining path not str --- src/installer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/installer.py b/src/installer.py index 76b06b9..6d854e5 100644 --- a/src/installer.py +++ b/src/installer.py @@ -9,22 +9,22 @@ from pathlib import Path def install(parsed) -> None: args = parsed.parse_args() if args.install: - projectDir = str(Path(__file__).resolve().parent.parent) + projectDir = Path(__file__).resolve().parent.parent homeDir = os.getenv("HOME") serviceDirExist = os.path.isdir(homeDir + "/.config/systemd/user/") delivered = False if serviceDirExist: delivered = filecmp.cmp( - projectDir + "/services/wthrc.service", + os.path.join(projectDir, "services/wthrc.service"), homeDir + "/.config/systemd/user/wthrc.service", shallow=True, ) if not delivered or not serviceDirExist: os.environ["DIR"] = projectDir - subprocess.call(["sh", projectDir + "/scripts/install.sh"]) - subprocess.call(["sh", projectDir + "/scripts/runner.sh"]) + subprocess.call(["sh", os.path.join(projectDir, "scripts/install.sh")]) + subprocess.call(["sh", os.path.join(projectDir, "scripts/runner.sh")]) sleep(5) else: