~cadence/bliz-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Fix bug with `test`

Details
Message ID
<20220330203400.2232607-1-tim@clifford.lol>
DKIM signature
missing
Download raw message
Patch: +1 -1
`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
Details
Message ID
<20220518011741.a9dc23003326f17b40b433e4@disroot.org>
In-Reply-To
<20220330203400.2232607-1-tim@clifford.lol> (view parent)
DKIM signature
missing
Download raw message
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.
:)
Reply to thread Export thread (mbox)