Skip to content

fix(ci): use correct path separator in justfile for Windows - #57

Merged
tkolleh merged 4 commits into
mainfrom
dependabot
Apr 19, 2026
Merged

fix(ci): use correct path separator in justfile for Windows#57
tkolleh merged 4 commits into
mainfrom
dependabot

Conversation

@tkolleh

@tkolleh tkolleh commented Apr 19, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the Windows build release job failure: ToolNotFound: failed to find tool "gcc".

Root Cause

The justfile had a hardcoded path export:

export PATH := absolute_path(".lux/" + lua_version + "/build_dependencies/" + lua_version + "/bin") + ":" + env_var('PATH')

Because a pre-compiled Windows native just.exe is downloaded in the workflow, env_var('PATH') inside just returns the Windows-style MSYS2 PATH, delimited by semicolons (e.g. C:\msys64\ucrt64\bin;C:\msys64\usr\bin;...).

The justfile blindly prepended a path using a colon (:) separator. When just executed a shell command (via just --shell bash build), it passed down this corrupted PATH string (...bin:C:\msys64\ucrt64\bin;...). The underlying MSYS2 Bash and the subsequent lx executable failed to correctly parse this malformed hybrid PATH variable. As a result, the PATH got truncated, and /ucrt64/bin was lost entirely, causing lx to fail with failed to find tool "gcc".

Changes

  • justfile: Dynamically adjust the path separator based on the operating system.
path_sep := if os() == "windows" { ";" } else { ":" }
export PATH := absolute_path(".lux/" + lua_version + "/build_dependencies/" + lua_version + "/bin") + path_sep + env_var('PATH')

Testing

This is a pre-existing issue. The justfile was hardcoded to use a Unix-style colon delimiter for paths without considering native Windows path construction when running just.exe.

tkolleh added 4 commits April 19, 2026 01:49
…igration

- Pin all GitHub Actions to immutable SHA digests (SLSA Level 3)
- Add Renovate configuration with corrected lux.toml regex and
  github-tags datasource (no native luarocks datasource exists)
- Map busted, luacov, luastatic to their canonical GitHub repos
- Add SBOM generation (anchore/sbom-action) for linux-x86_64 only
- Add build provenance attestation (actions/attest-build-provenance)
- Add update-release-notes job with attestation verification instructions
- Add luarocks-publish environment to publish workflow
- Fix indentation in publish.yml rockspec cleanup step
- Preserve paths-ignore in release-please workflow
- No permission changes to tests.yml (inherits repo default read)
…ensure-deps

The Windows build failed with 'ToolNotFound: failed to find tool gcc' because:
1. The MSYS2 setup-msys2 action only adds C:\msys64\usr\bin to GITHUB_PATH,
   not the UCRT64 subsystem bin directory. Native Windows programs (lx.exe,
   just.exe) couldn't find gcc.exe or lua.exe on the PATH.
2. The justfile's ensure-deps recipe didn't pass --lua-dir like other lx
   invocations, causing Lux to fail discovering Lua on non-standard paths.

Fixes:
- Add 'Add UCRT64 to PATH (Windows)' step after MSYS2 setup
- Pass --lua-dir to ensure-deps recipe in justfile
The Windows build failed with 'ToolNotFound: failed to find tool gcc' because
the justfile hardcoded a colon (':') as the PATH separator when prepending
the lux build dependencies bin directory. On Windows, this corrupted the
semicolon-separated PATH, causing MSYS2/Bash to lose access to /ucrt64/bin
and failing to find gcc.exe.

Fixes:
- Dynamically set path_sep to ';' on Windows and ':' otherwise in justfile
@tkolleh
tkolleh merged commit 036d66e into main Apr 19, 2026
2 checks passed
@tkolleh
tkolleh deleted the dependabot branch April 19, 2026 21:16
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.

1 participant