mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Normalize path separators when writing test entry file (#15473)
This commit is contained in:
parent
67ae44bddb
commit
cfca462c2b
1 changed files with 6 additions and 1 deletions
|
@ -1,6 +1,11 @@
|
|||
import { fromNode as fcb } from 'bluebird';
|
||||
import { readFile, writeFile, unlink, stat } from 'fs';
|
||||
|
||||
// We normalize all path separators to `/` in generated files
|
||||
function normalizePath(path) {
|
||||
return path.replace(/[\\\/]+/g, '/');
|
||||
}
|
||||
|
||||
export class UiBundle {
|
||||
constructor(options) {
|
||||
const {
|
||||
|
@ -34,7 +39,7 @@ export class UiBundle {
|
|||
|
||||
getRequires() {
|
||||
return this._modules.map(module => (
|
||||
`require('${module}');`
|
||||
`require('${normalizePath(module)}');`
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue