| 2101 | } |
| 2102 | |
| 2103 | int sys_command(const char *cmd) { |
| 2104 | #ifdef KORE_WINDOWS |
| 2105 | int wlen = MultiByteToWideChar(CP_UTF8, 0, cmd, -1, NULL, 0); |
| 2106 | wchar_t *wstr = new wchar_t[wlen]; |
| 2107 | MultiByteToWideChar(CP_UTF8, 0, cmd, -1, wstr, wlen); |
| 2108 | int result = _wsystem(wstr); |
| 2109 | delete[] wstr; |
| 2110 | #else |
| 2111 | int result = system(cmd); |
| 2112 | #endif |
| 2113 | return result; |
| 2114 | } |
| 2115 | |
| 2116 | void krom_sys_command(const FunctionCallbackInfo<Value> &args) { |
| 2117 | HandleScope scope(args.GetIsolate()); |
no outgoing calls
no test coverage detected