Skip to content

Revert "fix: Use arguments for to pass staged filenames to pre-commit task"#3791

Merged
jdx merged 1 commit intomainfrom
revert-3492-pre-commit-args
Dec 22, 2024
Merged

Revert "fix: Use arguments for to pass staged filenames to pre-commit task"#3791
jdx merged 1 commit intomainfrom
revert-3492-pre-commit-args

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Dec 22, 2024

Reverts #3492

this is creating a bunch of "mise.pre-commit' files that are annoying to deal with

@jdx jdx enabled auto-merge (squash) December 22, 2024 17:51
@jdx jdx disabled auto-merge December 22, 2024 17:52
@jdx jdx merged commit 5e0d93f into main Dec 22, 2024
@jdx jdx deleted the revert-3492-pre-commit-args branch December 22, 2024 17:58
@joshbode
Copy link
Copy Markdown
Contributor

joshbode commented Jan 6, 2025

I just noticed this revert - I can see what was wrong - the mktemp was missing the -t option so it was creating the pipe in the current folder (also this option is not available on the macOS (BSD) version of mktemp). Though, the trap should have been cleaning up the pipe, regardless...

This is what it should have been to be platform-independent (and correctly in the temp-dir):

: "${TMPDIR:=/tmp}"
PIPE=$(mktemp -u "${TMPDIR%/}/mise.{task}.XXXXXXXX")

I can make a PR again to fix this (and check the trap logic...), unless you want to stick with the STAGED approach (which as previously discussed won't work with files that have spaces).

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.

2 participants