File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -296,13 +296,13 @@ private static String getExecutable() {
296296 } else if (ImageInfo .inImageBuildtimeCode ()) {
297297 return "" ;
298298 } else {
299- // we quote all arguments here, because using sys.executable directly will only work on
300- // a shell, anyways.
301299 String [] executableList = getExecutableList ();
302300 for (int i = 0 ; i < executableList .length ; i ++) {
303- executableList [i ] = executableList [i ].replace ("'" , "\\ '" );
301+ if (executableList [i ].matches ("\\ s" )) {
302+ executableList [i ] = "'" + executableList [i ].replace ("'" , "\\ '" ) + "'" ;
303+ }
304304 }
305- return "'" + String .join ("' ' " , executableList ) + "'" ;
305+ return String .join (" " , executableList );
306306 }
307307 }
308308
You can’t perform that action at this time.
0 commit comments