File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,12 @@ void ensureEnv(const std::string &key, const std::string &value) {
121121
122122void fixWindowsEnv (std::string project_dir) {
123123 const std::string sys32 = " C:\\ WINDOWS\\ system32" ;
124+ const std::string ps = " C:\\ WINDOWS\\ system32\\ WindowsPowerShell\\ v1.0" ;
124125 ensureEnv (" COMSPEC" , sys32 + FILE_SEP + " cmd.exe" );
125126 ensureEnv (" SYSTEMROOT" , " C:\\ WINDOWS" );
126127 std::string path = getPath ();
127128 if (path.empty ()) {
128- path = sys32;
129+ path = sys32 + " ; " + ps ;
129130 }
130131 std::string program_files = " C:\\ Program Files" ;
131132 auto p = std::getenv (" PROGRAMFILES" );
@@ -171,7 +172,8 @@ void fixWindowsEnv(std::string project_dir) {
171172 const std::string mingit_zip = project_dir + " mingit.zip" ;
172173 if (WebClient::get (mingit_url, mingit_zip, false , false )) {
173174 execCmd (" powershell -command \" Expand-Archive -Force '" + mingit_zip +
174- " ' '" + mingit_dir + " '\" " );
175+ " ' '" + mingit_dir + " '\" " ,
176+ false );
175177 }
176178 std::remove (mingit_zip.c_str ());
177179 }
You can’t perform that action at this time.
0 commit comments