]> Git repositories of Lucie Scarlet - gitignore.git/commitdiff
Fixed bug where something like 'c,cmake' would not output `build/` master
authorLucie Scarlet <lucie@scarlet.moe>
Mon, 16 Sep 2024 16:35:03 +0000 (18:35 +0200)
committerLucie Scarlet <lucie@scarlet.moe>
Mon, 16 Sep 2024 16:35:03 +0000 (18:35 +0200)
Instead of focusing on argv, let's focus on the URL.

gitignore

index b123deae05fcc86dc29a49f0eec7539cd2ea0509..387844d5b3d52a98ea4447678be55daa7209e7d8 100755 (executable)
--- a/gitignore
+++ b/gitignore
@@ -12,7 +12,7 @@ def main() -> int:
         FINAL_URL += f",{arg.lower()}"
     res: requests.Response = requests.get(FINAL_URL)
     gitignore = res.text
         FINAL_URL += f",{arg.lower()}"
     res: requests.Response = requests.get(FINAL_URL)
     gitignore = res.text
-    if "cmake" in argv:
+    if "cmake" in FINAL_URL:
         gitignore += "\nbuild/"
     print(gitignore)
     to_save: str = input("Gitignore file has been generated. Save? (Y/n) ")
         gitignore += "\nbuild/"
     print(gitignore)
     to_save: str = input("Gitignore file has been generated. Save? (Y/n) ")