mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
home-manager: handle missing home-manager-path
When listing packages we have to handle the case where the rebuild command has not yet been run.
This commit is contained in:
parent
d7d02c3ce8
commit
a1cb111cc3
1 changed files with 5 additions and 1 deletions
|
@ -29,7 +29,11 @@ function doListGens() {
|
|||
function doListPackages() {
|
||||
local outPath
|
||||
outPath="$(nix-env -q --out-path | grep -o '/.*home-manager-path$')"
|
||||
if [[ -n "$outPath" ]] ; then
|
||||
nix-store -q --references "$outPath" | sed 's/[^-]*-//'
|
||||
else
|
||||
echo "No home-manager packages seem to be installed."
|
||||
fi
|
||||
}
|
||||
|
||||
function doHelp() {
|
||||
|
|
Loading…
Reference in a new issue