mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
resolve resource file paths relative to working directory (#516)
This commit is contained in:
parent
705e72b77f
commit
15b18bab8c
@ -117,9 +117,9 @@ exports.getResourcePath = function(filepath, filename) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// first, try resolving it relative to the current working directory (or just normalize it
|
||||
// if it's an absolute path)
|
||||
result = path.resolve(filepath);
|
||||
// first, try resolving it relative to the working directory (or just normalize it if it's an
|
||||
// absolute path)
|
||||
result = path.resolve(process.env.PWD, filepath);
|
||||
if ( !pathExists(result) ) {
|
||||
// next, try resolving it relative to the JSDoc directory
|
||||
result = path.resolve(env.dirname, filepath);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user