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

allow config files to be independent from worktree location #131

Merged
merged 1 commit into from
Oct 10, 2021

Conversation

tazjin
Copy link
Contributor

@tazjin tazjin commented Oct 7, 2021

This is useful in cases where a config file is built by Nix (e.g. to ensure the availability of all formatters by templating their paths), as would be preferred for the TVL monorepo.

@zimbatm
Copy link
Member

zimbatm commented Oct 7, 2021

Can you also expand the path if the config-file is passed?

$ cargo run -- --config-file ./docs/treefmt.toml --tree-root .
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/treefmt --config-file ./docs/treefmt.toml --tree-root .`
thread 'main' panicked at 'assertion failed: treefmt_toml.is_absolute()', src/engine.rs:35:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This is useful in cases where a config file is built by Nix (e.g. to
ensure the availability of all formatters by templating their paths),
as would be preferred for the TVL monorepo.
@tazjin
Copy link
Contributor Author

tazjin commented Oct 9, 2021

Can you also expand the path if the config-file is passed?

Done.

@zimbatm zimbatm merged commit 70990b3 into master Oct 10, 2021
@zimbatm zimbatm deleted the config-location branch October 10, 2021 14:25
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