aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2022-12-12 16:26:10 -0500
committerGitHub <noreply@github.com>2022-12-12 16:26:10 -0500
commitdc075dcdd0306adec911ec8d898b723f464f7c0a (patch)
tree7efc67f51d3e56a910ac188d16bde827c4e26884
parent1879c7c95e14ffcda30810747f28f422f56a63e2 (diff)
Apply suggestions from code review
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
-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^*'
```