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 ebc2cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
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 ebc2cb8

Please sign in to comment.