Skip to content

Commit

Permalink
fix(lib): [resolve] drive-specific current working directory fallback
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Dec 16, 2022
1 parent b2e088f commit 4263bf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ const config = {
'unicorn/custom-error-definition': 0
}
},
{
files: ['./src/lib/resolve.ts'],
rules: {
'@typescript-eslint/prefer-nullish-coalescing': 0
}
},
{
files: ['./src/pathe.ts'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const resolve = (...paths: string[]): string => {
*/

// set path to current working directory
path = ensurePosix(process.env[`=${resolved_device}`] ?? process.cwd())
path = ensurePosix(process.env[`=${resolved_device}`] || process.cwd())

/**
* Current working directory pointer check.
Expand Down

0 comments on commit 4263bf9

Please sign in to comment.