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 593f804 commit 4e140f1Copy full SHA for 4e140f1
lib/dtutils/system.lua
@@ -86,14 +86,13 @@ function dtutils_system.windows_command(command)
86
local file = io.open(fname, "w")
87
if file then
88
dt.print_log("opened file")
89
- command = string.gsub(command, "%%", "%%%%") -- escape % from windows shell
90
file:write("@echo off\n")
91
file:write('for /f "tokens=2 delims=:." %%x in (\'chcp\') do set cp=%%x\n')
92
file:write("chcp 65001>nul\n") -- change the encoding of the terminal to handle non-english characters in path
93
file:write("\n")
94
file:write(command .. "\n")
95
96
- file:write("chcp %%cp%%>nul\n")
+ file:write("chcp %cp%>nul\n")
97
file:close()
98
99
result = dt.control.execute(fname)
0 commit comments