ITADN

commands doesn't work when both `package` and `command` are set.

#365Openlandure 创建于 2026-04-17
bug
L
landurecommented
**Describe the bug** when describing a command with both `package` and `command` set, the `package` option is preferred to the `command` option. This means that the command is not created with the expected `name` even if the `name` appears in the menu. **To Reproduce** Steps to reproduce the behavior: ```nix devshells.default.commands = [ { name = "nil-diagnostics"; command = '' shopt -s globstar ${getExe pkgs.nil} diagnostics ./**/*.nix ''; package = pkgs.nil; category = "lint"; } ]; ``` The command appears in the menu, but `nil-diagnostics` isn't created. **Expected behavior** When both package and command are set, either: 1. display an error that it's one or the other. 2. create the command script, AND add both the command and package to the develop shell. **System information** <!-- What version of the software. On which system. --> nix --version nix (Nix) 2.28.4 **Additional context** `devshell` installed using flake parts.
0 条评论