You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running checksync from a location, it uses the current working directory for its discovery; but if a config file is given, or a location is passed, it should use that rather than the current working directory.
Otherwise, it's impossible to use outside of the intended directory, which is counter-intuitive.
The text was updated successfully, but these errors were encountered:
Thinking on this. I think that the suggested approaches are wrong for this. Instead, we should support a separate --cwd argument for specifying the working directory and a corresponding configuration file field. That way it is possible to override the current working directory for a specific invocation - the default would remain the folder that it is executed in.
## Summary:
This adds a new `--cwd` argument to override the current working directory that checksync uses.
More importantly, it now sets the current working directory to the location of the configuration file, if one is loaded. This ensures that paths/globs specified in a configuration file are interpreted relative to the configuration file, not the current working directory, which makes it a lot easier to reason about the configuration file definition.
Issue: fixes#1262
## Test plan:
`yarn test`
Author: somewhatabstract
Reviewers: jeremywiebe, kevinbarabash
Required Reviewers:
Approved By:
Checks: ✅ CodeQL, ✅ codecov/project, ✅ Test and build (macOS-latest, 18.x), ✅ Test and build (macOS-latest, 16.x), ✅ Test and build (ubuntu-latest, 18.x), ✅ Test and build (ubuntu-latest, 16.x), ✅ Test and build (windows-latest, 18.x), ✅ Test and build (windows-latest, 16.x), ✅ Integration tests (windows-latest, 18.x), ✅ Integration tests (windows-latest, 16.x), ✅ Integration tests (macOS-latest, 18.x), ✅ Integration tests (macOS-latest, 16.x), ✅ Integration tests (ubuntu-latest, 18.x), ✅ Integration tests (ubuntu-latest, 16.x), ✅ Update test coverage (ubuntu-latest, 16.x), ✅ Lint and static types check (ubuntu-latest, 16.x), ✅ Analyze (javascript), ⏭ dependabot
Pull Request URL: #1305
When running checksync from a location, it uses the current working directory for its discovery; but if a config file is given, or a location is passed, it should use that rather than the current working directory.
Otherwise, it's impossible to use outside of the intended directory, which is counter-intuitive.
The text was updated successfully, but these errors were encountered: