Skip to content

nix develop --expr with --argstr reports an error (and then proceeds to run the command correctly) #13482

@Pandapip1

Description

@Pandapip1

Describe the bug

When running the following nix develop command:

nix develop --impure --expr "import ./maintainers/scripts/update.nix" --argstr path python3Packages.optree --argstr skip-prompt true --argstr commit false

I get the following error:

error (ignored): error: '--arg' and '--argstr' are incompatible with flakes

However, I am not using flakes, the command proceeds normally, and the update process runs.

Steps To Reproduce

  1. Clone nixpkgs and cd into it
  2. Run the above command
  3. Observe the error. Also observe it performs the update process correctly.

Expected behavior

Either the passing of --argstr is a bug, as indicated by the error message, or the error message itself is the bug and should not have been displayed.

Metadata

nix-env (Nix) 2.28.4

Additional context

N.A.

Checklist

  • checked latest Nix manual (source)
  • checked open bug issues and pull requests for possible duplicates
    • Unfortunately the terms I have to work with here are pretty generic; so I skimmed through the titles of the 184 that matched. I might have missed it, in which case just mark this as a duplicate, and sorry!

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions