Skip to content

Commit c930017

Browse files
committed
run.sh: Add missing error message and send all error messages to stderr
1 parent 245ad5e commit c930017

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

assets/nix/run.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ for a in "$@"; do
9292
rotated=$((rotated+1))
9393
fi
9494
done
95+
echo 1>&2 "Please set executable_name to a valid name in a text editor"
9596
exit 1
9697
fi
9798
done
@@ -103,7 +104,7 @@ if [ -x "$1" ] ; then
103104
fi
104105

105106
if [ -z "${executable_name}" ] || [ ! -x "${executable_name}" ]; then
106-
echo "Please set executable_name to a valid name in a text editor or as the first command line parameter"
107+
echo 1>&2 "Please set executable_name to a valid name in a text editor or as the first command line parameter"
107108
exit 1
108109
fi
109110

@@ -150,8 +151,8 @@ case ${os_type} in
150151
;;
151152
*)
152153
# alright whos running games on freebsd
153-
echo "Unknown operating system ($(uname -s))"
154-
echo "Make an issue at https://github.com/NeighTools/UnityDoorstop"
154+
echo 1>&2 "Unknown operating system ($(uname -s))"
155+
echo 1>&2 "Make an issue at https://github.com/NeighTools/UnityDoorstop"
155156
exit 1
156157
;;
157158
esac
@@ -189,10 +190,10 @@ case "${file_out}" in
189190
arch="x86"
190191
;;
191192
*)
192-
echo "The executable \"${executable_path}\" is not compiled for x86 or x64 (might be ARM?)"
193-
echo "If you think this is a mistake (or would like to encourage support for other architectures)"
194-
echo "Please make an issue at https://github.com/NeighTools/UnityDoorstop"
195-
echo "Got: ${file_out}"
193+
echo 1>&2 "The executable \"${executable_path}\" is not compiled for x86 or x64 (might be ARM?)"
194+
echo 1>&2 "If you think this is a mistake (or would like to encourage support for other architectures)"
195+
echo 1>&2 "Please make an issue at https://github.com/NeighTools/UnityDoorstop"
196+
echo 1>&2 "Got: ${file_out}"
196197
exit 1
197198
;;
198199
esac

0 commit comments

Comments
 (0)