We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b16dc20 commit beba032Copy full SHA for beba032
java/kotlin-extractor/dev/wrapper.py
@@ -122,10 +122,13 @@ def forward(tool, forwarded_opts):
122
if platform.system() == "Windows":
123
tool = tool.with_suffix(".bat")
124
assert tool.exists(), f"{tool} not found"
125
- args = [tool]
126
- args.extend(forwarded_opts)
127
- ret = subprocess.run(args).returncode
128
- sys.exit(ret)
+ cmd = [tool] + forwarded_opts
+ if platform.system() == "Windows":
+ # kotlin bat script is pretty sensible to unquoted args on windows
+ ret = subprocess.run(" ".join(f'"{a}"' for a in cmd)).returncode
129
+ sys.exit(ret)
130
+ else:
131
+ os.execv(cmd[0], cmd)
132
133
134
def clear():
0 commit comments