aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2022-07-20 10:05:34 +0200
committerGitHub <noreply@github.com>2022-07-20 10:05:34 +0200
commit7ed91d6c6ab86199e7c9703f2852f47d36976d6b (patch)
tree64a829bc84eb0a16d0ed5943dbaf3b2bd3d96610 /src/libexpr/parser.y
parent56f6f3725f4fbeeb7900ae95bd71d559695b3dc5 (diff)
parentfbd0a6c6e2e87f6679fe5cabaddaa877cf3e5a90 (diff)
Merge branch 'master' into parallel-nix-copy
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index 8cbc2da4d..7c9b5a2db 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -520,6 +520,12 @@ path_start
$$ = new ExprPath(path);
}
| HPATH {
+ if (evalSettings.pureEval) {
+ throw Error(
+ "the path '%s' can not be resolved in pure mode",
+ std::string_view($1.p, $1.l)
+ );
+ }
Path path(getHome() + std::string($1.p + 1, $1.l - 1));
$$ = new ExprPath(path);
}