Skip to content

home-manager: fix home-manager build error#2514

Merged
berbiche merged 1 commit intonix-community:masterfrom
polykernel:home-manager-patch-2
Nov 29, 2021
Merged

home-manager: fix home-manager build error#2514
berbiche merged 1 commit intonix-community:masterfrom
polykernel:home-manager-patch-2

Conversation

@polykernel
Copy link
Copy Markdown
Contributor

@polykernel polykernel commented Nov 28, 2021

Two misplaced quotations were introduced in doBuild by #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.

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

    • Added myself and the module files to .github/CODEOWNERS.

@polykernel polykernel requested a review from rycee as a code owner November 28, 2021 23:40
Two misplaced quotations were introduced in `doBuild` by #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.
Copy link
Copy Markdown
Member

@berbiche berbiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed the misplaced quotes in my original review 😔

Thanks for the fix.

@berbiche berbiche merged commit 9de7722 into nix-community:master Nov 29, 2021
@polykernel polykernel deleted the home-manager-patch-2 branch December 1, 2021 00:36
@Prillan
Copy link
Copy Markdown

Prillan commented Dec 2, 2021

Is there a process for getting this backported? It's currently broken in release-21.11 :/

rycee pushed a commit that referenced this pull request Dec 2, 2021
Two misplaced quotations were introduced in `doBuild` by #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 9de7722)
@rycee
Copy link
Copy Markdown
Member

rycee commented Dec 2, 2021

@Prillan Cherry-picked to 21.11 now.

@Prillan
Copy link
Copy Markdown

Prillan commented Dec 3, 2021

@Prillan Cherry-picked to 21.11 now.

Amazing, thank you!

peterhoeg pushed a commit to peterhoeg/home-manager that referenced this pull request Dec 6, 2021
Two misplaced quotations were introduced in `doBuild` by nix-community#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants