mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
native: add support for print, eprint and eprintln (#11034)
This commit is contained in:
@@ -346,7 +346,7 @@ pub fn execute(cmd string) Result {
|
||||
// if cmd.contains(';') || cmd.contains('&&') || cmd.contains('||') || cmd.contains('\n') {
|
||||
// return Result{ exit_code: -1, output: ';, &&, || and \\n are not allowed in shell commands' }
|
||||
// }
|
||||
pcmd := '$cmd 2>&1'
|
||||
pcmd := if cmd.contains('2>') { cmd } else { '$cmd 2>&1' }
|
||||
f := vpopen(pcmd)
|
||||
if isnil(f) {
|
||||
return Result{
|
||||
|
||||
Reference in New Issue
Block a user