forked from lix-project/lix
Slight cleanup of InstallablesCommand::load
This commit is contained in:
parent
fa4733fce5
commit
57a2e46ee0
|
@ -708,8 +708,8 @@ void InstallablesCommand::prepare()
|
||||||
installables = load();
|
installables = load();
|
||||||
}
|
}
|
||||||
|
|
||||||
Installables InstallablesCommand::load() {
|
Installables InstallablesCommand::load()
|
||||||
Installables installables;
|
{
|
||||||
if (_installables.empty() && useDefaultInstallables())
|
if (_installables.empty() && useDefaultInstallables())
|
||||||
// FIXME: commands like "nix profile install" should not have a
|
// FIXME: commands like "nix profile install" should not have a
|
||||||
// default, probably.
|
// default, probably.
|
||||||
|
@ -719,11 +719,8 @@ Installables InstallablesCommand::load() {
|
||||||
|
|
||||||
std::vector<std::string> InstallablesCommand::getFlakesForCompletion()
|
std::vector<std::string> InstallablesCommand::getFlakesForCompletion()
|
||||||
{
|
{
|
||||||
if (_installables.empty()) {
|
if (_installables.empty() && useDefaultInstallables())
|
||||||
if (useDefaultInstallables())
|
|
||||||
return {"."};
|
return {"."};
|
||||||
return {};
|
|
||||||
}
|
|
||||||
return _installables;
|
return _installables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue