Skip to content

fix: resolve commands relative to the root #398

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

Merged
merged 5 commits into from
Aug 29, 2024
Merged

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Aug 28, 2024

When configuring treefmt with relative paths to commands, for example if
you want to create your own repo-specific wrappers, treefmt would fail
if executed in a sub-directory.

This change makes sure that the relative path is resolved based on the
treefmt root instead of the current directory.

@zimbatm zimbatm requested a review from brianmcgee August 28, 2024 13:26
Copy link
Member

@brianmcgee brianmcgee left a comment

Choose a reason for hiding this comment

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

lgtm

@brianmcgee
Copy link
Member

@Mergifyio rebase

Make it easier for developers to find out how to update the file.
The -C is not relevant for this unit test.
Describe what happens when running treefmt in a sub-folder of the
project.
When configuring treefmt with relative paths to commands, for example if
you want to create your own repo-specific wrappers, treefmt would fail
if executed in a sub-directory.

This change makes sure that the relative path is resolved based on the
treefmt root instead of the current directory.
Copy link
Contributor

mergify bot commented Aug 29, 2024

rebase

✅ Branch has been successfully rebased

@brianmcgee brianmcgee merged commit 8da3985 into main Aug 29, 2024
24 checks passed
@brianmcgee brianmcgee deleted the relative-program branch August 29, 2024 16:22
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