We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e8cd9e commit dbee121Copy full SHA for dbee121
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"
0 commit comments