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

cleanup: remove external command #19

Closed
zimbatm opened this issue Jan 27, 2021 · 1 comment
Closed

cleanup: remove external command #19

zimbatm opened this issue Jan 27, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@zimbatm
Copy link
Member

zimbatm commented Jan 27, 2021

While doing a strace on the project I noticed that there are two commands being invoked that are not entirely necessary.

  • which: seems to be used by the which crate. This program is not installed on every system. Instead, we should use a native rust library to lookup the program path.
  • mkdir -p: I think this can be replaced with some native rust code as well.

This is not urgent as it doesn't change the design of the program. Replacing those with native rust code will just make the project a bit more resilient.

@zimbatm zimbatm added the enhancement New feature or request label Jan 27, 2021
@Rizary
Copy link
Contributor

Rizary commented Jan 27, 2021

We should do this if we are targeting cross-platform. But the use of which is not related to which crate, it's just invoking which using cmd! macros.

@zimbatm zimbatm closed this as completed Feb 1, 2021
@zimbatm zimbatm reopened this Feb 1, 2021
@zimbatm zimbatm closed this as completed Feb 15, 2021
brianmcgee added a commit that referenced this issue May 13, 2024
Introduces a `--walk` flag which can be used to tell `treefmt` how to traverse the directory specified by `--tree-root`.

By default, it will attempt to use `git ls-files`. If this fails, it falls back to using the filesystem.

You can explicitly traverse the filesystem instead of using git by providing `--walk filesystem`.

Close #1

Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/19
Reviewed-by: Jonas Chevalier <zimbatm@noreply.git.numtide.com>
Co-authored-by: Brian McGee <brian@bmcgee.ie>
Co-committed-by: Brian McGee <brian@bmcgee.ie>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants