From b3772c9502207f264357ca219b56d4d76ab376e3 Mon Sep 17 00:00:00 2001 From: Brikaa Date: Fri, 10 Sep 2021 15:33:36 +0200 Subject: [PATCH] pkg(mono-6.12.0): redirect mono error to stderr --- packages/mono/6.12.0/compile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/mono/6.12.0/compile b/packages/mono/6.12.0/compile index 5246bc2..e3ae230 100644 --- a/packages/mono/6.12.0/compile +++ b/packages/mono/6.12.0/compile @@ -1,13 +1,20 @@ #!/bin/bash +check_errors () { + grep -q 'error [A-Z]\+[0-9]\+:' check.txt && cat check.txt 1>&2 || cat check.txt + rm check.txt +} + case "${PISTON_LANGUAGE}" in csharp) rename 's/$/\.cs/' "$@" # Add .cs extension - csc -out:out *.cs + csc -out:out *.cs > check.txt + check_errors ;; basic) rename 's/$/\.vb/' "$@" # Add .vb extension - vbnc -out:out *.vb + vbnc -out:out *.vb > check.txt + check_errors ;; *) echo "How did you get here? (${PISTON_LANGUAGE})"