Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- name: Setup mise
uses: ./
with:
cache_key_prefix: mise-debug-v1
mise_toml: |
[tools]
jq = "1.7.1"
Expand All @@ -55,6 +56,7 @@ jobs:
MY_ENV_VAR = "abc"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTIONS_STEP_DEBUG: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACTIONS_STEP_DEBUG permanently enabled in CI workflow

Low Severity

ACTIONS_STEP_DEBUG: true is set as a permanent environment variable on the test step. This enables verbose GitHub Actions step-level debug output for every CI run, not just during active debugging. This looks like a leftover from investigating the Windows caching issue described in the PR.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 121dc09. Configure here.

- run: mise --version
- run: mise x jq -- jq --version
- run: which jq
Expand Down
8 changes: 8 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ function miseDir(): string {
const { MISE_DATA_DIR, XDG_DATA_HOME, LOCALAPPDATA } = process.env
if (MISE_DATA_DIR) return MISE_DATA_DIR
if (XDG_DATA_HOME) return path.join(XDG_DATA_HOME, 'mise')

if (process.platform === 'win32' && LOCALAPPDATA)
return path.join(LOCALAPPDATA, 'mise')
Comment on lines 403 to 404

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Windows fix is absent — cross-drive saveCache error persists

The PR title promises "use workspace-local mise dir on Windows for cache compatibility," but miseDir() is unchanged: it still returns path.join(LOCALAPPDATA, 'mise') on Windows. On GitHub-hosted Windows runners LOCALAPPDATA is on C: while GITHUB_WORKSPACE is on D:, so saveCache still passes a cross-drive path to @actions/cache, which triggers the "Path Validation Error" on every cold-cache run. The diagnostic logging added below will show the C:\… path, confirming the bug isn't fixed yet.

The intended fix — falling back to path.join(process.env.GITHUB_WORKSPACE!, '.mise') when on Windows — needs to be added here:

Suggested change
if (process.platform === 'win32' && LOCALAPPDATA)
return path.join(LOCALAPPDATA, 'mise')
if (process.platform === 'win32') {
const workspace = process.env.GITHUB_WORKSPACE
if (workspace) return path.join(workspace, '.mise')
if (LOCALAPPDATA) return path.join(LOCALAPPDATA, 'mise')
}

Fix in Claude Code


Expand All @@ -408,6 +409,14 @@ function miseDir(): string {
async function saveCache(cacheKey: string): Promise<void> {
await core.group(`Saving mise cache`, async () => {
const cachePath = miseDir()
core.info(`Cache path: ${cachePath}`)
core.info(`Cache path exists: ${fs.existsSync(cachePath)}`)
core.info(`Platform: ${process.platform}`)
core.info(`GITHUB_WORKSPACE: ${process.env.GITHUB_WORKSPACE}`)
if (fs.existsSync(cachePath)) {
const contents = await fs.promises.readdir(cachePath)
core.info(`Cache dir contents: ${JSON.stringify(contents)}`)
}

if (!fs.existsSync(cachePath)) {
throw new Error(`Cache folder path does not exist on disk: ${cachePath}`)
Expand Down
Loading