diff options
author | sterni <sternenseemann@systemli.org> | 2022-10-20T22·52+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-10-21T00·11+0000 |
commit | 64bb501de1d52ce004d530d1fc15392537ee2beb (patch) | |
tree | 40ffd435406f3235cbb323e98cfcd2ad8d02084a /tvix/eval/src/vm.rs | |
parent | 5753fc14f5a24b2c4d5f4c76ed22d28a1be67c2a (diff) |
fix(tvix): distinguish search- and relative path resolution errors r/5172
Failures to resolve a nix search path lookup in angle brackets can be caught using tryEval (if it reaches the runtime). Resolving relative paths (either to the current directory or the current user's home) can never be caught, even if they happen inside a thunk at runtime (which is currently the case for home-relative paths). Change-Id: I7f73221df66d82a381dd4063358906257826995a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7025 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r-- | tvix/eval/src/vm.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index ff39cf129572..1128031b41bc 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -555,7 +555,7 @@ impl<'o> VM<'o> { Value::UnresolvedPath(path) => { match dirs::home_dir() { None => { - return Err(self.error(ErrorKind::PathResolution( + return Err(self.error(ErrorKind::RelativePathResolution( "failed to determine home directory".into(), ))); } |