-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Describe the bug
This has to do with the symlink strategy for the vendored files. See, the askama macro expansion attempts to fetch something from its "canonical" path and produces this path, which looks fine!
/nix/store/xsslyz1min98f6vybfdgpmkzks0n2q4d-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/async-graphql-8.0.0-rc.1/src/http/../../../../../six525kx1s0sb6299l3d06j3nj59kidl-cargo-package-async-graphql-8.0.0-rc.1/templates/graphiql_source.jinja
..but if you realpath it, it fails with "no such file or directory" which seems weird! Because /nix/store/six525kx1s0sb6299l3d06j3nj59kidl-cargo-package-async-graphql-8.0.0-rc.1/templates/graphiql_source.jinja does indeed exist!
But then for a sanity check I went ahead and realpath'd just /nix/store/xsslyz1min98f6vybfdgpmkzks0n2q4d-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/async-graphql-8.0.0-rc.1/src/http/../../../../../ and actually got / as the result which seems wrong.
But if I change in the directory /nix/store/xsslyz1min98f6vybfdgpmkzks0n2q4d-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/async-graphql-8.0.0-rc.1/src/http and run realpath $(pwd) it resolves to /nix/store/six525kx1s0sb6299l3d06j3nj59kidl-cargo-package-async-graphql-8.0.0-rc.1/src/http and suddenly things become clearer.
The ../../../../../ works off of the real path, not the symlinked path which then transports it up to the root directory.
Well, I have no idea how this would be fixed but this is unfortunately a thing and is also reproducible if you just change into the symlinked directory and use bat to try to list any directory that bash actually autocompletes.
Reproduction
[can add upon request]