aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installables.hh
diff options
context:
space:
mode:
authordramforever <dramforever@live.com>2023-01-23 23:06:57 +0800
committerdramforever <dramforever@live.com>2023-01-30 23:59:09 +0800
commitb26562c629604b76c58b789ee520581cc5549433 (patch)
tree4a16aa5cd2efae7afc5b6746831a3b51bd80ffa0 /src/libcmd/installables.hh
parent90e630a542c163e4d0fa2fb28bc6e1782e4bd394 (diff)
InstallableFlake: Handle missing attr in getCursors
Handle the case where none of getActualAttrPaths() actually exists, in which case instead of returning an empty vector. This fixes the case where the user misspells the attribute name in nix search. Instead of getting no search results, now it shows an error with suggestions. Also remove InstallableFlake::getCursor() override since it's now equivalent to the base class version.
Diffstat (limited to 'src/libcmd/installables.hh')
-rw-r--r--src/libcmd/installables.hh4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libcmd/installables.hh b/src/libcmd/installables.hh
index 3d12639b0..d489315df 100644
--- a/src/libcmd/installables.hh
+++ b/src/libcmd/installables.hh
@@ -198,10 +198,6 @@ struct InstallableFlake : InstallableValue
std::vector<ref<eval_cache::AttrCursor>>
getCursors(EvalState & state) override;
- /* Get a cursor to the first attrpath in getActualAttrPaths() that
- exists, or throw an exception with suggestions if none exists. */
- ref<eval_cache::AttrCursor> getCursor(EvalState & state) override;
-
std::shared_ptr<flake::LockedFlake> getLockedFlake() const;
FlakeRef nixpkgsFlakeRef() const override;