Skip to content

Commit

Permalink
address review issue: relative path should work too
Browse files Browse the repository at this point in the history
  • Loading branch information
vast committed Sep 16, 2021
1 parent 7aa1896 commit 7fda6df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const findUpStop = Symbol('findUpStop');
export async function findUp(name, options = {}) {
let directory = path.resolve(options.cwd || '');
const {root} = path.parse(directory);
const stopAt = options.stopAt || root;
const stopAt = path.resolve(directory, options.stopAt || root);
const paths = [name].flat();

const runMatcher = async locateOptions => {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Allow symbolic links to match if they point to the chosen path type.
Type: `string`\
Default: `path.parse(cwd).root`

The absolute path to the directory to stop the search before reaching root if there were no matches before the `stopAt` directory.
The path to the directory to stop the search before reaching root if there were no matches before the `stopAt` directory.

### pathExists(path)

Expand Down

0 comments on commit 7fda6df

Please sign in to comment.