Hi, I had an issue with the working directory of `main.fish`, so I used
the same code as `certs.fish` to make it possible to run it from a
different working directory. I also fixed a bug on macOS, so it now
works there as well!
Sorry, this is my first time using sourcehut, and I've never sent a
patch like this before, so hopefully everything works..
flry (2):
Support running `main.fish` from a different dir
Fix error on macOS
main.fish | 2 ++
src/cgi.fish | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
--
2.34.1
From: flry <flry@git.sr.ht>
On Linux, `file` uses the `-i` option for mime types, but on macOS
that option is called `-I`. The long `--mime` option is cross-platform.
---
src/cgi.fish | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cgi.fish b/src/cgi.fish
index 5c32d04..1f66a18 100644
--- a/src/cgi.fish+++ b/src/cgi.fish
@@ -121,7 +121,7 @@ if test -f "$file_path"
if string match -q -r -- '^.*\.(gmi)$' $file_path
set mime text/gemini
else
- set mime (file -ib $file_path)+ set mime (file -b --mime $file_path) end
gem_header 20 $mime
cat $file_path
--
2.34.1