-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cwd arg and cwd behavior (#1305)
## 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
- Loading branch information
1 parent
95d1a29
commit 14bbc5f
Showing
29 changed files
with
868 additions
and
528 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"checksync": major | ||
--- | ||
|
||
- The location of the configuration file is now used as the current working directory, if a configuration file is used. This means that globs are resolved relative to the configuration file, not the current working directory of the process launching checksync, which makes for a more deterministic behavior for | ||
folks trying to define and use their config files. | ||
- A `--cwd` argument has been added for specifying the working directory in cases where a configuration file is not used, or the configuration file discover needs to start in a place other than where checksync is invoked. If a configuration file is loaded, the location of that file takes precedence. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.