From 61fb3319292dfb2dd596441ab66f6ddb47def111 Mon Sep 17 00:00:00 2001 From: "michael.dsilva" Date: Mon, 23 Sep 2024 16:54:55 +1000 Subject: [PATCH 1/6] move error to stderr + try a test for it --- tools/aarnetfilesender/filesender.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/aarnetfilesender/filesender.xml b/tools/aarnetfilesender/filesender.xml index 368b47f2..e985aae7 100644 --- a/tools/aarnetfilesender/filesender.xml +++ b/tools/aarnetfilesender/filesender.xml @@ -10,7 +10,7 @@ #set $apikey = $__user__.extra_preferences.get('aarnet_filesender_account|apikey', "").strip() #if $apiuser == "" or $apikey == "": - echo "ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section" && + echo "ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section" >&2 && exit 1; #end if @@ -41,6 +41,9 @@ filesender -p -u '$apiuser' -a '$apikey' -b https://filesender.aarnet.edu.au/res + + + From 1176d7c3efce10e27a7c89589164c20df680b58c Mon Sep 17 00:00:00 2001 From: "michael.dsilva" Date: Tue, 24 Sep 2024 14:10:04 +1000 Subject: [PATCH 2/6] FileSender: @TomHarrop suggested a test using hidden input types to get around userpref values being missing --- tools/aarnetfilesender/filesender.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/aarnetfilesender/filesender.xml b/tools/aarnetfilesender/filesender.xml index e985aae7..bd316c87 100644 --- a/tools/aarnetfilesender/filesender.xml +++ b/tools/aarnetfilesender/filesender.xml @@ -6,6 +6,11 @@ &1 && + exit 0; +#end if + #set $apiuser = $__user__.extra_preferences.get('aarnet_filesender_account|username', "").strip() #set $apikey = $__user__.extra_preferences.get('aarnet_filesender_account|apikey', "").strip() @@ -34,6 +39,7 @@ filesender -p -u '$apiuser' -a '$apikey' -b https://filesender.aarnet.edu.au/res +