mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
home-manager: fix home-manager build error (#2514)
Two misplaced quotations were introduced in `doBuild` by https://github.com/nix-community/home-manager/pull/2501, which
caused the parameter expansion of DRY_RUN to include an extraneous tab. Since the flake uri is passed
later into the command, Nix assumes the whitespace sequence as the flake uri and returns that it is not
a valid flake reference.
This PR removes the misplaced quotations in `doBuild` and also places the flake uri as the first argument for
calls to `doBuildFlake` for consistency with `doBuildAttr`. Placing the uri first in the command line also guards
against possible security issues if arbitrary uris are expanded prior to the user given uri.
(cherry picked from commit 9de77227d7
)
This commit is contained in:
parent
3e93c4e8b2
commit
9437177e82
1 changed files with 3 additions and 3 deletions
|
@ -263,9 +263,9 @@ function doBuild() {
|
|||
setFlakeAttribute
|
||||
if [[ -v FLAKE_CONFIG_URI ]]; then
|
||||
doBuildFlake \
|
||||
"${DRY_RUN+--dry-run} \
|
||||
"${NO_OUT_LINK+--no-link} \
|
||||
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||
${DRY_RUN+--dry-run} \
|
||||
${NO_OUT_LINK+--no-link} \
|
||||
|| return
|
||||
else
|
||||
doBuildAttr \
|
||||
|
@ -294,8 +294,8 @@ function doSwitch() {
|
|||
setFlakeAttribute
|
||||
if [[ -v FLAKE_CONFIG_URI ]]; then
|
||||
doBuildFlake \
|
||||
--out-link "$generation" \
|
||||
"$FLAKE_CONFIG_URI.activationPackage" \
|
||||
--out-link "$generation" \
|
||||
&& "$generation/activate" || return
|
||||
else
|
||||
doBuildAttr \
|
||||
|
|
Loading…
Reference in a new issue