From 7a1ac7c579fa351b2deb570ce1197eb7c5426416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kro=CC=88ner?= Date: Mon, 7 Oct 2024 13:19:24 +0200 Subject: [PATCH] Add support for files containing spaces in their names Currently files with spaces will break the `tea` command. By enclosing the filenames in quotes the issue is resolved. --- forgejo-release.sh | 2 +- testdata/upload-download/upload-dir/file 3.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 testdata/upload-download/upload-dir/file 3.txt diff --git a/forgejo-release.sh b/forgejo-release.sh index 3b1e4b1..03e8964 100755 --- a/forgejo-release.sh +++ b/forgejo-release.sh @@ -43,7 +43,7 @@ ensure_tag() { } upload_release() { - local assets=$(ls $RELEASE_DIR/* | sed -e 's/^/-a /') + local assets=$(ls $RELEASE_DIR/* | sed -e 's/^/-a "/' -e 's/$/" /') if $PRERELEASE || echo "${TAG}" | grep -qi '\-rc' ; then releasetype="--prerelease" echo "Uploading as Pre-Release" diff --git a/testdata/upload-download/upload-dir/file 3.txt b/testdata/upload-download/upload-dir/file 3.txt new file mode 100644 index 0000000..9eeba5f --- /dev/null +++ b/testdata/upload-download/upload-dir/file 3.txt @@ -0,0 +1 @@ +FILE3