Skip to content

fix: keep the input list apart from the cache helper in the flake check - #40

Merged
Muddyblack merged 1 commit into
Muddyblack:masterfrom
Chr1ssi:fix/flake-check-ignore-list-quoting
Oct 19, 2026
Merged

Muddyblack merged 1 commit into
Muddyblack:masterfrom
Chr1ssi:fix/flake-check-ignore-list-quoting

Conversation

@Chr1ssi

@Chr1ssi Chr1ssi commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #38.

Since #35, checkFlakeUpdates() builds its command as

NIXDATIFIER_IGNORE_INPUTS='''/…/tools/sh/run' cached 'flake:…' 30 -- …

probeEnv ends with the quoted input list and no space, so the list and the quoted helper path form a single word. The path becomes the variable's value, and bash runs cached as the command (cached: command not found, exit 127). Every flake check fails as soon as a flake path is set, whatever the list contains, so no update is ever reported.

The fix ends probeEnv with a space, as the partial probe (NIXDATIFIER_ONLY_INPUTS=… ) already does. The cache scope uses probeEnv.trim(), so its key stays the same and existing cache entries stay valid.

Tests

  • New test_flake_check_keeps_the_input_list_apart_from_the_helper in tests/tst_Engine.qml checks the command for an empty list and for nur. Without the fix it fails, and the failure shows the glued string. With the fix it passes.
  • nix develop --command bash tests/run.sh: 91 helper tests OK, 124 QML tests passed.
  • nix develop --command bash scripts/lint.sh: all checks passed.
  • On my NixOS desktop the standalone app with this one-line change reports the 3 pending flake updates, where the unpatched build reported 0.

Side note: nix flake check (checks.tests) fails on unmodified master too. The helpers start with #!/usr/bin/env bash, and /usr/bin/env doesn't exist in the build sandbox. CI isn't affected because it runs the scripts through nix develop.

🤖 Generated with Claude Code

Since #35 the flake check builds its command as

    NIXDATIFIER_IGNORE_INPUTS='''/…/tools/sh/run' cached 'flake:…' 30 -- …

The quoted list and the quoted helper path form one word, so the path
becomes the variable's value and bash runs `cached` as the command:
"cached: command not found", and no update is ever reported. End the
prefix with a space, as the partial probe already does. The cache scope
trims the prefix, so existing cache entries stay valid.

Fixes #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Muddyblack

Copy link
Copy Markdown
Owner

thank you :=)

@Muddyblack
Muddyblack merged commit 7bbc595 into Muddyblack:master Oct 19, 2026
4 checks passed
Chr1ssi added a commit to Chr1ssi/Nix that referenced this pull request Oct 19, 2026
The fix landed upstream as Muddyblack/nixdatifier#40 (7bbc595), so the local
substituteInPlace no longer matches and --replace-fail stopped the build as
intended. The module is back to plain upstream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

command not found in update script

2 participants