mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Handle Windows when checking relative paths (#16380)
This commit is contained in:
parent
232b267510
commit
2fd058876c
2 changed files with 13 additions and 3 deletions
9
packages/kbn-build/dist/cli.js
vendored
9
packages/kbn-build/dist/cli.js
vendored
|
@ -23514,7 +23514,7 @@ class Project {
|
|||
}
|
||||
|
||||
ensureValidProjectDependency(project) {
|
||||
const relativePathToProject = _path2.default.relative(this.path, project.path);
|
||||
const relativePathToProject = normalizePath(_path2.default.relative(this.path, project.path));
|
||||
|
||||
const versionInPackageJson = this.allDependencies[project.name];
|
||||
const expectedVersionInPackageJson = `${PREFIX}${relativePathToProject}`;
|
||||
|
@ -23554,7 +23554,12 @@ class Project {
|
|||
return (0, _scripts.installInDir)(this.path, extraArgs);
|
||||
}
|
||||
}
|
||||
exports.Project = Project;
|
||||
|
||||
exports.Project = Project; // We normalize all path separators to `/` in generated files
|
||||
|
||||
function normalizePath(path) {
|
||||
return path.replace(/[\\\/]+/g, '/');
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
/* 175 */
|
||||
|
|
|
@ -34,7 +34,7 @@ export class Project {
|
|||
}
|
||||
|
||||
ensureValidProjectDependency(project) {
|
||||
const relativePathToProject = path.relative(this.path, project.path);
|
||||
const relativePathToProject = normalizePath(path.relative(this.path, project.path));
|
||||
|
||||
const versionInPackageJson = this.allDependencies[project.name];
|
||||
const expectedVersionInPackageJson = `${PREFIX}${relativePathToProject}`;
|
||||
|
@ -88,3 +88,8 @@ export class Project {
|
|||
return installInDir(this.path, extraArgs);
|
||||
}
|
||||
}
|
||||
|
||||
// We normalize all path separators to `/` in generated files
|
||||
function normalizePath(path) {
|
||||
return path.replace(/[\\\/]+/g, '/');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue