Skip to content

Commit

Permalink
fix: use path.resolve instead of string interpolation
Browse files Browse the repository at this point in the history
Co-authored-by: JounQin <admin@1stg.me>
  • Loading branch information
sanderson-ut and JounQin committed Oct 19, 2022
1 parent fba2865 commit ea39e0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const isFile = (path?: string | undefined): path is string => {
}

const isModule = (modulePath?: string | undefined): modulePath is string => {
return !!modulePath && isFile(`${modulePath}${path.sep}package.json`)
return !!modulePath && isFile(path.resolve(modulePath, 'package.json'))
}

/**
Expand Down

0 comments on commit ea39e0b

Please sign in to comment.