Better getConfigPath()
This commit is contained in:
parent
ce15511cf1
commit
5ab927d2f5
|
@ -9,9 +9,9 @@ const paths = require('path');
|
||||||
exports.getConfigPath = getConfigPath;
|
exports.getConfigPath = getConfigPath;
|
||||||
|
|
||||||
function getConfigPath(filePath) {
|
function getConfigPath(filePath) {
|
||||||
// |filePath| is assumed to be in the config path if it's only a file name
|
if (paths.isAbsolute(filePath)) {
|
||||||
if('.' === paths.dirname(filePath)) {
|
return filePath;
|
||||||
filePath = paths.join(Config().paths.config, filePath);
|
|
||||||
}
|
}
|
||||||
return filePath;
|
|
||||||
|
return paths.join(Config().paths.config, filePath);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue