ItsEthra / typst-live

Hot reloading for your typst files
MIT License
87 stars 8 forks source link

--no-recompile flag not working anymore #22

Closed timon-schelling closed 1 month ago

timon-schelling commented 1 month ago

To reproduce:

> typst-live --no-recompile ./main.pdf
[ERROR] When using --no-recompile option, filename must be pdf file

currently I have no time to do a full git bisect

but 550a69bea07d3948bbe9e2dfe0c45447b8f1bc83 is good

ItsEthra commented 1 month ago

The point of --no-recompile is to only show and update the pdf in the browser tab, that's why the error message says

filename must be a pdf file

This is provided in the case when your IDE/LSP/whatever automatically compiles typst sources into a pdf so you only want to show the pdf in the browser.

timon-schelling commented 1 month ago

@ItsEthra sorry originally copied the wrong command but its happening when using a .pdf file

# typst-live --no-recompile ./main.pdf
[ERROR] When using --no-recompile option, filename must be pdf file
ItsEthra commented 1 month ago

I see, can you try latest commit and if it doesn't work, try debug printing the args.filename

timon-schelling commented 1 month ago

Yes, it's fixed. Thanks :)