mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Allow .sourcePath of NodeModulesDirectory to be absolute.
This commit is contained in:
@@ -328,9 +328,16 @@ export class NodeModulesDirectory {
|
||||
|
||||
const nodeModulesDirectories = Object.create(null);
|
||||
|
||||
function add(moreInfo, relPath) {
|
||||
rejectBadPath(relPath);
|
||||
const sourcePath = files.pathJoin(callerInfo.sourceRoot, relPath);
|
||||
function add(moreInfo, path) {
|
||||
let sourcePath;
|
||||
|
||||
if (files.pathIsAbsolute(path)) {
|
||||
sourcePath = path;
|
||||
} else {
|
||||
rejectBadPath(path);
|
||||
sourcePath = files.pathJoin(callerInfo.sourceRoot, path);
|
||||
}
|
||||
|
||||
nodeModulesDirectories[sourcePath] = new NodeModulesDirectory({
|
||||
...callerInfo,
|
||||
...moreInfo,
|
||||
|
||||
Reference in New Issue
Block a user