openfl / hxp

Write scripts in Haxe, and execute them on Windows, macOS or Linux
MIT License
58 stars 19 forks source link

Unify runProcess and runCommand #21

Closed dpomier closed 4 years ago

dpomier commented 4 years ago

This PR modifies System.runProcess to align on how System.runCommand deals with non-executable commands. If args is an empty array or null, the process is instantiated as new sys.io.Process(cmd, null) as done in runCommand:

https://github.com/openfl/hxp/blob/5a3e0436ca685b85c9ac380de559d8b29ae696fb/src/hxp/System.hx#L1055-L1062

Also the argument args has been changed from args:Array<String> to args:Array<String> = null in both runCommand and runSystem for consistency.