Skip to content

i3-sway: empty set argument was passed to wrong function#2819

Merged
sumnerevans merged 1 commit intonix-community:masterfrom
stephaneyfx:fix-optionals-call-in-i3-sway
Mar 22, 2022
Merged

i3-sway: empty set argument was passed to wrong function#2819
sumnerevans merged 1 commit intonix-community:masterfrom
stephaneyfx:fix-optionals-call-in-i3-sway

Conversation

@stephaneyfx
Copy link
Copy Markdown
Contributor

This would give the error "attempt to call something which is not a
function but a list" given that optionals a b returns a list.

Description

This fixes the following error when running home-manager switch and sway is used in the configuration:

error: attempt to call something which is not a function but a list

       at /home/.../src/home-manager/modules/services/window-managers/i3-sway/lib/functions.nix:96:16:

           95|               (optionalString (trayOutput != null) "tray_output ${trayOutput}")
           96|               (optionals colorsNotNull (indent
             |                ^
           97|                 (lists.subtractLists [ "" null ] [

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.

@stephaneyfx stephaneyfx force-pushed the fix-optionals-call-in-i3-sway branch from e259fde to fe81560 Compare March 22, 2022 18:10
@stephaneyfx
Copy link
Copy Markdown
Contributor Author

Thank you for your review @sumnerevans! It turns out the empty set argument was needed; it was just passed to the wrong function (optionals instead of indent). I amended the commit and its description.

@sumnerevans sumnerevans changed the title i3-sway: Remove extra argument in call to optionals i3-sway: empty set argument was passed to wrong function Mar 22, 2022
This would give the error "attempt to call something which is not a
function but a list" given that `optionals a b` returns a list. `indent`
is the one taking this empty set as second argument.
@stephaneyfx stephaneyfx force-pushed the fix-optionals-call-in-i3-sway branch from fe81560 to ef1c368 Compare March 22, 2022 19:49
@stephaneyfx
Copy link
Copy Markdown
Contributor Author

I forgot to run the formatting tool this time around so I had to push again. Sorry for the noise and thank you for restarting the tests.

@sumnerevans sumnerevans merged commit 48a1584 into nix-community:master Mar 22, 2022
jficz pushed a commit to jficz/home-manager that referenced this pull request Apr 7, 2022
…ty#2819)

This would give the error "attempt to call something which is not a
function but a list" given that `optionals a b` returns a list. `indent`
is the one taking this empty set as second argument.
@teto teto mentioned this pull request Aug 22, 2022
7 tasks
teto pushed a commit to teto/home-manager that referenced this pull request Aug 22, 2022
…ty#2819)

This would give the error "attempt to call something which is not a
function but a list" given that `optionals a b` returns a list. `indent`
is the one taking this empty set as second argument.
spacekookie pushed a commit to spacekookie/home-manager that referenced this pull request Feb 10, 2023
…ty#2819)

This would give the error "attempt to call something which is not a
function but a list" given that `optionals a b` returns a list. `indent`
is the one taking this empty set as second argument.
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.

2 participants