add subprocess cmd

This commit is contained in:
Daniella / Tove 2022-03-24 15:24:34 +01:00
parent 19fe403eb3
commit 9174ba0dd8

View file

@ -830,6 +830,15 @@ public class ISBPL {
((ISBPLCallable) o.object).call(stack); ((ISBPLCallable) o.object).call(stack);
}; };
break; break;
case "subprocess":
func = (Stack<ISBPLObject> stack) -> {
try {
Runtime.getRuntime().exec(toJavaString(stack.pop()));
} catch(IOException e) {
throw new ISBPLError("IO", "Couldn't start process");
}
};
break;
default: default:
func = natives.get(name); func = natives.get(name);
break; break;