~cadence/bliz-devel

Fix bug with `test` v1 APPLIED

Tim Clifford: 1
 Fix bug with `test`

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~cadence/bliz-devel/patches/30689/mbox | git am -3
Learn more about email & git

[PATCH] Fix bug with `test` Export this patch

`test` requires quotes around variables with =, or it can fail when the
variable is empty. In this case it would fail successfully (lol) but
print an ugly error message.
---
 src/cgi.fish | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cgi.fish b/src/cgi.fish
index 1f66a18..721e7b3 100644
--- a/src/cgi.fish
+++ b/src/cgi.fish
@@ -41,7 +41,7 @@ end

# check for file source mode
set source_mode false
if test $req_query = "source=1"
if test "$req_query" = "source=1"
    set source_mode true
end

--
2.35.1
I decided to apply this patch. As we discussed, it shouldn't be
necessary in theory, but there's no harm in adding the double quotes.
:)