aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/derived-path.cc2
-rw-r--r--src/nix/nix.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/derived-path.cc b/src/libstore/derived-path.cc
index 7fe797aa1..05c2303db 100644
--- a/src/libstore/derived-path.cc
+++ b/src/libstore/derived-path.cc
@@ -93,7 +93,7 @@ DerivedPath::Built DerivedPath::Built::parse(const Store & store, std::string_vi
DerivedPath DerivedPath::parse(const Store & store, std::string_view s)
{
- size_t n = s.rfind("!");
+ size_t n = s.find("!");
return n == s.npos
? (DerivedPath) DerivedPath::Opaque::parse(store, s)
: (DerivedPath) DerivedPath::Built::parse(store, s.substr(0, n), s.substr(n + 1));
diff --git a/src/nix/nix.md b/src/nix/nix.md
index 811936024..6ff27e479 100644
--- a/src/nix/nix.md
+++ b/src/nix/nix.md
@@ -187,7 +187,7 @@ operate are determined as follows:
and likewise, again using a store path to a "drv" file to specify the derivation:
```console
- # nix path-info -S --eval-store auto --store https://cache.nixos.org '/nix/store/gzaflydcr6sb3567hap9q6srzx8ggdgg-glibc-2.33-78.drv^*'
+ # nix path-info -S '/nix/store/gzaflydcr6sb3567hap9q6srzx8ggdgg-glibc-2.33-78.drv^*'
```