Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use arguments for to pass staged filenames to pre-commit task #3492

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

joshbode
Copy link
Contributor

No description provided.

@joshbode joshbode changed the title Use arguments for to pass staged filenames to pre-commit task fix: Use arguments for to pass staged filenames to pre-commit task Dec 12, 2024
@jdx jdx merged commit d5781be into jdx:main Dec 12, 2024
19 checks passed
set -- "$@" "${{ARG}}"
done < "${{PIPE}}"

exec mise run "{task}" "$@"
Copy link
Owner

Choose a reason for hiding this comment

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

I already merged this but realized this should be exec mise run "{task}" -- "$@" though the only time that would matter is if you added a flag to the pre-commit task that had the exact string as a filename

Copy link
Contributor Author

@joshbode joshbode Dec 12, 2024

Choose a reason for hiding this comment

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

ah - good point, but yes... pretty unlikely - and hopefully people avoid filenames with leading dashes :)

@joshbode joshbode deleted the pre-commit-args branch December 12, 2024 11:14
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