nix-update icon indicating copy to clipboard operation
nix-update copied to clipboard

error: unrecognised flag '-A'

Open qzylinra opened this issue 4 months ago • 4 comments

When using --test, there will be problems if the package has multiple tests

qzylinra avatar Sep 14 '25 03:09 qzylinra

Please paste the log or backtrace.

SuperSandro2000 avatar Sep 14 '25 18:09 SuperSandro2000

error: unrecognised flag '-A'
Try 'nix --help' for more information.
$ nix build -L --extra-experimental-features 'flakes nix-command' -f /home/runner/work/nixpkgs/nixpkgs/nixpkgs -A dart.tests.testCompile -A dart.tests.testCreate
Traceback (most recent call last):
  File "/nix/store/xriyzbirmcgnmcsk91f4ph30n8s6bz5f-nix-update-1.13.0/bin/.nix-update-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/xriyzbirmcgnmcsk91f4ph30n8s6bz5f-nix-update-1.13.0/lib/python3.13/site-packages/nix_update/__init__.py", line 483, in main
    run_post_update_checks(options, package)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/nix/store/xriyzbirmcgnmcsk91f4ph30n8s6bz5f-nix-update-1.13.0/lib/python3.13/site-packages/nix_update/__init__.py", line 424, in run_post_update_checks
    nix_test(options, package)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/nix/store/xriyzbirmcgnmcsk91f4ph30n8s6bz5f-nix-update-1.13.0/lib/python3.13/site-packages/nix_update/__init__.py", line 390, in nix_test
    run(cmd, stdout=None)
    ~~~^^^^^^^^^^^^^^^^^^
  File "/nix/store/xriyzbirmcgnmcsk91f4ph30n8s6bz5f-nix-update-1.13.0/lib/python3.13/site-packages/nix_update/utils.py", line 54, in run
    return subprocess.run(
           ~~~~~~~~~~~~~~^
        command,
        ^^^^^^^^
    ...<5 lines>...
        env=env,
        ^^^^^^^^
    )
    ^
  File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['nix', 'build', '-L', '--extra-experimental-features', 'flakes nix-command', '-f', '/home/runner/work/nixpkgs/nixpkgs/nixpkgs', '-A', 'dart.tests.testCompile', '-A', 'dart.tests.testCreate']' returned non-zero exit status 1.

qzylinra avatar Sep 18 '25 09:09 qzylinra

Can we get the full command as well?

Mic92 avatar Sep 23 '25 11:09 Mic92

nix-update --test dart

qzylinra avatar Sep 23 '25 11:09 qzylinra