Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: programs.git-credential-oauth eval error: cannot coerce a set to a string #6005

Closed
2 tasks done
powpingdone opened this issue Oct 25, 2024 · 2 comments · Fixed by #6008
Closed
2 tasks done

bug: programs.git-credential-oauth eval error: cannot coerce a set to a string #6005

powpingdone opened this issue Oct 25, 2024 · 2 comments · Fixed by #6008
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@powpingdone
Copy link

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

When programs.git-credential-oauth.enable = true;, nixos-rebuild fails with the following error:

         at /nix/store/a8yg0d34q9qfkc693p0mc2g12v5n50vp-source/modules/programs/git-credential-oauth.nix:33:52:
           32|     programs.git.extraConfig.credential.helper = [
           33|       ("${cfg.package}/bin/git-credential-oauth" + lib.mkIf cfg.extraFlags
             |                                                    ^
           34|         " ${lib.strings.concatStringsSep " " cfg.extraFlags}")

       error: cannot coerce a set to a string: { _type = "if"; condition = «thunk»; content = «thunk»; }

Maintainer CC

@tomodachi94

System information

- system: `"aarch64-linux"`
 - host os: `Linux 6.12.0-rc4, NixOS, 24.11 (Vicuna), 24.11.20241018.4c2fcb0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.9`
 - nixpkgs: `/nix/store/riqkpszjqk02bi1wppfg8ip5xvh102qd-source`
@powpingdone powpingdone added bug triage Issues or feature request that have not been triaged yet labels Oct 25, 2024
@tomodachi94
Copy link
Contributor

😅 This is what I get for not writing tests. Fix (and a test case) coming soon.

tomodachi94 added a commit to tomodachi94/home-manager that referenced this issue Oct 26, 2024
lib.mkIf != lib.optionalString

Closes nix-community#6005
@tomodachi94
Copy link
Contributor

Fix created at #6008. I also added some tests to avoid something as obvious as this from slipping through again 🙈

@rycee rycee closed this as completed in 05d9bee Oct 27, 2024
colonelpanic8 pushed a commit to colonelpanic8/home-manager that referenced this issue Dec 30, 2024
Scrumplex pushed a commit to Scrumplex/home-manager that referenced this issue Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants