mirror of
https://github.com/nix-community/home-manager
synced 2025-01-11 19:49:49 +01:00
home-manager: refuse build if CWD is read-only
This produces a clearer error message than produced by Nix. Fixes #116.
This commit is contained in:
parent
b4f5b5556f
commit
14083a0857
1 changed files with 5 additions and 0 deletions
|
@ -113,6 +113,11 @@ function presentNews() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function doBuild() {
|
function doBuild() {
|
||||||
|
if [[ ! -w . ]]; then
|
||||||
|
errorEcho "Cannot run build in read-only directory";
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
local newsInfo
|
local newsInfo
|
||||||
newsInfo=$(buildNews)
|
newsInfo=$(buildNews)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue