diff options
Diffstat (limited to 'src/libcmd/installables.cc')
-rw-r--r-- | src/libcmd/installables.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 5603a4f2b..cfc13a60f 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -708,8 +708,8 @@ void InstallablesCommand::prepare() installables = load(); } -Installables InstallablesCommand::load() { - Installables installables; +Installables InstallablesCommand::load() +{ if (_installables.empty() && useDefaultInstallables()) // FIXME: commands like "nix profile install" should not have a // default, probably. @@ -719,11 +719,8 @@ Installables InstallablesCommand::load() { std::vector<std::string> InstallablesCommand::getFlakesForCompletion() { - if (_installables.empty()) { - if (useDefaultInstallables()) - return {"."}; - return {}; - } + if (_installables.empty() && useDefaultInstallables()) + return {"."}; return _installables; } |