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() {
296
296
} else if (ImageInfo .inImageBuildtimeCode ()) {
297
297
return "" ;
298
298
} else {
299
- // we quote all arguments here, because using sys.executable directly will only work on
300
- // a shell, anyways.
301
299
String [] executableList = getExecutableList ();
302
300
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
+ }
304
304
}
305
- return "'" + String .join ("' ' " , executableList ) + "'" ;
305
+ return String .join (" " , executableList );
306
306
}
307
307
}
308
308
You can’t perform that action at this time.
0 commit comments