Repository navigation
Conversation
The 1.17.0 Chocolatey package switched Windows installs to the packed-metanorma MSI (metanorma/packed-metanorma#259). The MSI adds its install directory to the MACHINE PATH, which later workflow steps never see - each Actions step is a fresh process inheriting the environment captured at job start - so every mn-samples generate workflow fails on Windows with 'Unable to locate executable file: metanorma.exe' (packed-metanorma#274). Query the Windows uninstall registry for the Metanorma entry's InstallLocation after a successful choco install and export it via core.addPath, covering both flat and bin-subdirectory MSI layouts.
…Location The tebako MSI's uninstall entry carries no InstallLocation, so the registry lookup found nothing on real runners. Fall back to a bounded metanorma.exe search over the per-machine Program Files roots, which is where the packaging installs.
…trap seed The MSI appends <install>\\bin and <install>\\home\\shims to the machine PATH and creates the metanorma shim through bootstrap-seed.cmd, a quiet custom action whose failure is swallowed. Read the InstallDir value the MSI itself records under SOFTWARE\\Metanorma\\metanorma, re-run the idempotent seed, and export both directories to the job PATH.
The seed script's tebako steps have no error handling and it always exits 0, so a failed 'tebako install metanorma' left an empty shims directory that looked healthy. Log the seed's captured output and warn when the metanorma shim is missing after the run.
Contributor
Author
|
Attribution of the remaining red legs (none are caused by this change — the choco path this PR touches is verified working in the CI logs):
What this PR delivers today: correct PATH export of the MSI's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the fleet-wide red Windows legs:
Unable to locate executable file: metanorma.exe(metanorma/packed-metanorma#274).Since the 1.17.0 Chocolatey package switched Windows installs to the packed-metanorma MSI (packed-metanorma#259), the
generateworkflows of every mn-samples repository fail onwindows-latest:ChocoInstallerexported nothing, so the setup step reported success while the binary stayed unreachable.The fix: after a successful
choco install metanorma, query the Windows uninstall registry for the Metanorma entry'sInstallLocationand export it viacore.addPath, covering both flat andbin-subdirectory MSI layouts (with a warning fallback if no entry is found).Validated:
npm run build(tsc + esbuild) and the full vitest suite (12 files, 138 tests) pass. The repo'sintegration-test/idempotency-testWindows workflows exercise the choco path end-to-end on real runners.Cut as 3.1.1 (patch);
v3needs re-pointing after release so the fleet picks it up.