We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 934a3d0 + 9e21355 commit 5cadd95Copy full SHA for 5cadd95
gptscript/gptscript.py
@@ -1,4 +1,5 @@
1
import json
2
+import platform
3
import os
4
from socket import socket
5
from subprocess import Popen, PIPE
@@ -144,4 +145,8 @@ def _get_command():
144
145
if os.getenv("GPTSCRIPT_BIN") is not None:
146
return os.getenv("GPTSCRIPT_BIN")
147
- return os.path.join(os.path.dirname(executable), "gptscript")
148
+ bin_path = os.path.join(os.path.dirname(executable), "gptscript")
149
+ if platform.system() == "Windows":
150
+ bin_path += ".exe"
151
+
152
+ return bin_path if os.path.exists(bin_path) else "gptscript"
pyproject.toml
@@ -12,6 +12,7 @@ license = { file = "LICENSE" }
12
dependencies = [
13
"certifi==2024.2.2",
14
"charset-normalizer==3.3.2",
15
+ "httpx==0.27.0",
16
"idna==3.6",
17
"requests==2.31.0",
18
"tqdm==4.66.2",
0 commit comments