error: input file not found (searched at file.typ)
Description
typst 0.11.0 (2bf9f95d)
Installed via snap.
I have a super simple typst file:
- One
- Two
- Three
When I try to compile using typst compile file.typ I get the following error:
error: input file not found (searched at file.typ)
which is a little bit unclear to me, as the file exists in the folder where I call typst.
Reproduction URL
No response
Operating system
Linux
Typst version
- [ ] I am using the latest version of Typst
Hey, I wasn't able to reproduce this issue. Can you run ls before typst compile file.typ? That should include a file named file.typ.
I still do not know what is causing the issue. However, I have found out the problem exists only when the .typ file is placed in a path inside the /tmp directory, for example /tmp/foo.typ o /tmp/bar/foo.typ. I can compile when the .typ file is located in any other directory.
This is expected. The Snap is running in full confinement (as opposed to Snaps you need to install with --classic). This means that by default, it can only read your home directory. You can add the capability to read from removable media in dev by running snap connect typst:removable-media. You cannot, however, add the capability to read any other directories, see https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1643706. Publishing new Snaps in classic confinement that have this ability is strongly discouraged by the Snapcraft docs (see https://snapcraft.io/docs/classic-confinement).