Skip to content

Shellcheck failure since recent update causes nixos-anywhere test failure #868

@ahayzen

Description

@ahayzen

My flake is moving from 856a2902156ba304efebd4c1096dbf7465569454 to 5e40e02978e3bd63c2a6a9fa6fa8ba0e310e747f and now fails with the following when running nixos-anywhere and using disko.

error: builder for '/nix/store/kkv73jq43r5i1kwiwjizwbf34cqkwcjl-disko-destroy-format-mount.drv' failed with exit code 1;
       last 12 log lines:
       >
       > In /nix/store/fhk167wv3j36rnxihbahfsx45hk4ajzd-disko-destroy-format-mount line 7:
       >   for dev in '/dev/vdb'; do
       >              ^--------^ SC2041 (warning): This is a literal string. To run as a command, use $(..) instead of '..' . 
       >
       >
       > In /nix/store/fhk167wv3j36rnxihbahfsx45hk4ajzd-disko-destroy-format-mount line 25:
       > for dev in '/dev/vdb'; do
       >            ^--------^ SC2041 (warning): This is a literal string. To run as a command, use $(..) instead of '..' . 
       >
       > For more information:
       >   https://www.shellcheck.net/wiki/SC2041 -- This is a literal string. To run ...
       For full logs, run 'nix log /nix/store/kkv73jq43r5i1kwiwjizwbf34cqkwcjl-disko-destroy-format-mount.drv'.
error: 1 dependencies of derivation '/nix/store/6dgr3rj60zmhawmmq0p612j6xi0vhimh-nixos-test-driver-disko-lab-disko.drv' failed to build

I believe that this is referring to this loop

disko/lib/default.nix

Lines 559 to 562 in 5e40e02

# shellcheck disable=SC2043
for dev in ${selectedDisks}; do
echo " - $dev"
done

Which appears to have been changed recently in this commit 94bc0f5 via this pull request #842

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedIssue has been confirmed/reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions