Skip to content

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

Merged
jdx merged 2 commits intojdx:mainfrom
joshbode:pre-commit-args
Dec 12, 2024
Merged

fix: Use arguments for to pass staged filenames to pre-commit task#3492
jdx merged 2 commits intojdx:mainfrom
joshbode:pre-commit-args

Conversation

@joshbode
Copy link
Copy Markdown
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
set -- "$@" "${{ARG}}"
done < "${{PIPE}}"

exec mise run "{task}" "$@"
Copy link
Copy Markdown
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
Copy Markdown
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 :)

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