You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zine fails to build a newly-generated project, reporting a panic: Error: No such file or directory (os error 2)
How to reproduce?
install zine 0.3.0
zine new testproject
cd testproject
zine build
The build should fail by now.
What might cause the issue?
After digging around in the source code, I believe the problem results from include_dir crate.
In 0.3.0, Zine copies the builtin static files into output directory's static folder by using include_dir. When include_dir extracting a file, it simply uses fs::write(TAEGET_PATH), which will panic if TARGET_PATH includes non-existence directory.
Because testproject/build/static directory does not exists when include_dir tries to extract zine's buildin static file, it simply panics.
In version 0.2.1, zine would create the output static directory first before copying static files, so the problem did not exist.
If we create mkdir testproject/build/static manually, then zine build successfully.
The text was updated successfully, but these errors were encountered:
Which version am I using?
zine 0.3.0 on Mac mini (M1, 2020)
What's the problem?
Zine fails to build a newly-generated project, reporting a panic:
Error: No such file or directory (os error 2)
How to reproduce?
The build should fail by now.
What might cause the issue?
After digging around in the source code, I believe the problem results from
include_dir
crate.In 0.3.0, Zine copies the builtin static files into output directory's static folder by using
include_dir
. Wheninclude_dir
extracting a file, it simply usesfs::write(TAEGET_PATH)
, which will panic ifTARGET_PATH
includes non-existence directory.Because
testproject/build/static
directory does not exists wheninclude_dir
tries to extract zine's buildin static file, it simply panics.In version
![截屏2022-04-02 下午9 40 03](https://user-images.githubusercontent.com/11747908/161386081-92b7d104-f978-48de-af4f-38717a604a26.png)
0.2.1
, zine would create the output static directory first before copying static files, so the problem did not exist.If we create
mkdir testproject/build/static
manually, thenzine build
successfully.The text was updated successfully, but these errors were encountered: