fix: when cwd is root and the <rootDir> tag is replaced, the resulting path should not begin with //

This commit is contained in:
Ben Heidemann 2021-04-10 11:40:11 +01:00 committed by David Humphrey
parent e489409b9c
commit 8b4b0a6140
1 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ module.exports = {
if (!value) {
return path.join(CWD, 'node_modules', 'filer');
}
return value.replace(ROOT_DIR_TAG, CWD);
return path.resolve(value.replace(ROOT_DIR_TAG, CWD));
},
},
shimsDir: {
@ -17,18 +17,18 @@ module.exports = {
if (!value) {
return path.join(CWD, 'node_modules', 'filer', 'shims');
}
return value.replace(ROOT_DIR_TAG, CWD);
return path.resolve(value.replace(ROOT_DIR_TAG, CWD));
}
},
shimFs: { default: true },
shimPath: { default: true},
fsProvider: { default: 'default'},
fsProviderDir: {
process: function(value) {
if (!value) {
return path.join(CWD, 'node_modules', 'filer', 'shims', 'providers');
}
return value.replace(ROOT_DIR_TAG, CWD);
return path.resolve(value.replace(ROOT_DIR_TAG, CWD));
},
},
shimFs: { default: true },
shimPath: { default: true},
fsProvider: { default: 'default'},
};