generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
path.resolve
instead of path.join
and nativePath
`path.resolve` joins and normalizes paths, returning an absolute path. We want all environment variables to be set to absolute paths, with all directory separators fixed and root `/` turned to `C:\\` or `D:\\` on Windows. `path.resolve` does that. I thought it was important to use `path.resolve` after any use of `glob.sync`, since those necessarily introduce new `/` into the paths. I left two instances of `path.join` in places where I thought the absolute path didn't matter, because they are either not used to build a path (in `locateQtArchDir`) or upstream of a `path.resolve` (in `toolsPaths`). Perhaps this is the wrong approach, and will lead to future inconsistency; perhaps not. Hopefully the tests will be enough.
- Loading branch information
Showing
1 changed file
with
13 additions
and
14 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