mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[timelion] Fix load_functions on Windows (#169587)
Fixes https://github.com/elastic/kibana/issues/168605 Testing - see https://github.com/elastic/kibana/issues/168605#issuecomment-1769347395 1) Install Kibana under `C:\Program Files (x86)`, or a path spaces and parentheses. Test builds are available in Buildkite on the artifacts tab on the `Build Kibana Distribution and Plugins` step. 2) Create a Timelion visualization 3) `.es(*)` should load
This commit is contained in:
parent
891358ff80
commit
d719c89190
1 changed files with 4 additions and 4 deletions
|
@ -8,8 +8,6 @@
|
|||
|
||||
import _ from 'lodash';
|
||||
import globby from 'globby';
|
||||
import path from 'path';
|
||||
import normalizePath from 'normalize-path';
|
||||
import processFunctionDefinition from './process_function_definition';
|
||||
|
||||
export default function (directory) {
|
||||
|
@ -20,7 +18,7 @@ export default function (directory) {
|
|||
// Get a list of all files and use the filename as the object key
|
||||
const files = _.map(
|
||||
globby
|
||||
.sync(normalizePath(path.resolve(__dirname, '../' + directory + '/*.js')))
|
||||
.sync('../' + directory + '/*.js', { cwd: __dirname })
|
||||
.filter((filename) => !filename.includes('.test')),
|
||||
function (file) {
|
||||
const name = file.substring(file.lastIndexOf('/') + 1, file.lastIndexOf('.'));
|
||||
|
@ -30,7 +28,9 @@ export default function (directory) {
|
|||
|
||||
// Get a list of all directories with an index.js, use the directory name as the key in the object
|
||||
const directories = _.chain(
|
||||
globby.sync(normalizePath(path.resolve(__dirname, '../' + directory + '/*/index.js')))
|
||||
globby.sync('../' + directory + '/*/index.js', {
|
||||
cwd: __dirname,
|
||||
})
|
||||
)
|
||||
.map(function (file) {
|
||||
const parts = file.split('/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue