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

Avoid overwriting apheleia-formatters for npx commands #152

Merged
merged 1 commit into from
Feb 4, 2023

Conversation

stonekyx
Copy link
Contributor

When the formatter is an npx command, setcar is used to expand the
binary file path to node_modules/.bin. But setcar overwrites the
underlying list, so the expanded path is set into
apheleia-formatters. (The list was processed by remq before setcar,
but remq seems to return the cdr if only the first element is
removed.) This is undesirable because when working on multiple NPM
packages, each package may have a formatter of different version.


When the formatter is an npx command, setcar is used to expand the
binary file path to node_modules/.bin. But setcar overwrites the
underlying list, so the expanded path is set into
apheleia-formatters. (The list was processed by remq before setcar,
but remq seems to return the cdr if only the first element is
removed.) This is undesirable because when working on multiple NPM
packages, each package may have a formatter of different version.
Copy link
Member

@raxod502 raxod502 left a comment

Choose a reason for hiding this comment

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

✨ Oops, that's embarrassing. Thanks for fixing this.

@raxod502 raxod502 merged commit a74cd99 into radian-software:main Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants