From 327c8d67349b3a648c52d060adb0247f546e4bbb Mon Sep 17 00:00:00 2001 From: Timo Schmidt Date: Fri, 31 Mar 2023 18:54:47 +0200 Subject: [PATCH] error handling --- .bashrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index cb054c8..4feb0ae 100644 --- a/.bashrc +++ b/.bashrc @@ -154,8 +154,11 @@ timoulinette () { # Download tesfile curl -sL "${git_full}" -o "${download_file_name}" - if [ ! "${?}" = "1" ] ; then + if [ ! "${?}" = "0" ] ; then printf '%s\n' "There's now testfile for this task, sorry!" + printf '%s\n' "Download url is" + printf '%s\n' "${git_full}" + rm -f -- "${download_file_name}" return fi