mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-32806 Parse script arguments on Java side to make it consistent with Run and Debug
This commit is contained in:
@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
import os
|
||||
import shlex
|
||||
import sys
|
||||
|
||||
from _pydev_bundle import pydev_imports
|
||||
@@ -182,7 +181,7 @@ def runfile(filename, args=None, wdir=None, is_module=False, global_vars=None):
|
||||
|
||||
sys.argv = [filename]
|
||||
if args is not None:
|
||||
for arg in shlex.split(args):
|
||||
for arg in args:
|
||||
sys.argv.append(arg)
|
||||
|
||||
if wdir is not None:
|
||||
|
||||
@@ -279,9 +279,16 @@ public class PythonScriptCommandLineState extends PythonCommandLineState {
|
||||
|
||||
sb.append("runfile('").append(escape(scriptPath)).append("'");
|
||||
|
||||
String scriptParameters = myConfig.getScriptParameters();
|
||||
if (!scriptParameters.isEmpty()) {
|
||||
sb.append(", args='").append(escape(scriptParameters)).append("'");
|
||||
final String[] scriptParameters = ParametersList.parse(myConfig.getScriptParameters());
|
||||
if (scriptParameters.length != 0) {
|
||||
sb.append(", args=[");
|
||||
for (int i = 0; i < scriptParameters.length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("'").append(escape(scriptParameters[i])).append("'");
|
||||
}
|
||||
sb.append("]");
|
||||
}
|
||||
|
||||
if (!workingDir.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user