From 14cb74e4f1dcba23fdb6518def41ffd1dde9f483 Mon Sep 17 00:00:00 2001 From: Enzo Nunes Date: Sun, 23 Feb 2025 23:29:45 +0000 Subject: [PATCH] fix clone target folder --- PICable.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PICable.py b/PICable.py index 942d0ea..143d16d 100644 --- a/PICable.py +++ b/PICable.py @@ -39,8 +39,7 @@ def get_commits_last_30_days(owner, repo, token): def get_lines_of_code(owner, repo): repo_url = f"https://github.com/{owner}/{repo}.git" - clone_dir = os.path.expanduser("~/temp/PICable") - rm_dir = os.path.expanduser(f"~/temp/PICable/{repo}") + clone_dir = os.path.expanduser(f"~/temp/PICable/{repo}") try: subprocess.run(["git", "clone", repo_url, clone_dir], check=True, stdout=sys.stdout, stderr=sys.stderr) @@ -54,7 +53,7 @@ def get_lines_of_code(owner, repo): break else: loc = 0 - subprocess.run(["rm", "-rf", rm_dir], check=True) + subprocess.run(["rm", "-rf", clone_dir], check=True) return loc @@ -117,3 +116,5 @@ def PICable(owner, repository, token): res += f"The repository {repository_url} is almost PICable. There are certain requirements which are almost met by this repository. Consult with a professor before proceeding. :warning:\n" return res + +print(PICable("Enzo-Nunes", "SkyForge", "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")) \ No newline at end of file