diff --git a/package/contents/ui/Engine.qml b/package/contents/ui/Engine.qml index 83a2420..6d904d2 100644 --- a/package/contents/ui/Engine.qml +++ b/package/contents/ui/Engine.qml @@ -1907,7 +1907,7 @@ Item { root.isCheckingFlake = true; const epoch = root.flakeEpoch; const settingsKey = root.probeSettingsKey; - const probeEnv = "NIXDATIFIER_CHECK_TARBALLS=" + (root.settings.checkTarballs ? "on " : "off ") + "NIXDATIFIER_DEEP_INPUTS=" + (root.settings.deepInputCheck ? "on " : "off ") + "NIXDATIFIER_IGNORE_INPUTS=" + shq(root.settings.ignoredInputs || ""); + const probeEnv = "NIXDATIFIER_CHECK_TARBALLS=" + (root.settings.checkTarballs ? "on " : "off ") + "NIXDATIFIER_DEEP_INPUTS=" + (root.settings.deepInputCheck ? "on " : "off ") + "NIXDATIFIER_IGNORE_INPUTS=" + shq(root.settings.ignoredInputs || "") + " "; sh(probeEnv + shq(root.scriptDir + "run") + " cached " + shq("flake:" + root.flakePath + (probeEnv ? ":" + probeEnv.trim() : "")) + " 30 -- " + shq(root.scriptDir + "flake-probe") + " " + shq(root.flakePath), function (cmd, out, err, code) { root.isCheckingFlake = false; if (epoch !== root.flakeEpoch || settingsKey !== root.probeSettingsKey) diff --git a/tests/tst_Engine.qml b/tests/tst_Engine.qml index 44a4cb3..6f98eed 100644 --- a/tests/tst_Engine.qml +++ b/tests/tst_Engine.qml @@ -597,6 +597,19 @@ Item { compare(lines[2].split("\t")[0], "hm"); compare(lines[3].split("\t")[0], "extra"); } + function test_flake_check_keeps_the_input_list_apart_from_the_helper() { + // Glued to the assignment, the helper's path became its value and bash ran `cached` (#38). + const original = cfg.ignoredInputs; + for (const list of ["", "nur"]) { + cfg.ignoredInputs = list; + jobs = []; + core.isCheckingFlake = false; + core.checkFlakeUpdates(); + compare(jobs.length, 1); + verify(jobs[0].cmd.indexOf("NIXDATIFIER_IGNORE_INPUTS=" + core.shq(list) + " " + core.shq(core.scriptDir + "run") + " cached ") >= 0, jobs[0].cmd); + } + cfg.ignoredInputs = original; + } function test_putting_inputs_back_probes_only_those() { cfg.ignoredInputs = "nur,hm"; core.initialized = true;