[plugin-helpers] remove outdated postinstall task (#66324) (#66343)

# Conflicts:
#	packages/kbn-plugin-helpers/lib/tasks.js
This commit is contained in:
Spencer 2020-05-13 01:52:48 -07:00 committed by GitHub
parent 507f1ab4a0
commit 820197602e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 48 deletions

View file

@ -88,6 +88,4 @@ program
}))
);
program.command('postinstall').action(createCommanderAction('postinstall'));
program.parse(process.argv);

View file

@ -22,7 +22,6 @@ const startTask = require('../tasks/start');
const testAllTask = require('../tasks/test/all');
const testBrowserTask = require('../tasks/test/browser');
const testServerTask = require('../tasks/test/server');
const postinstallTask = require('../tasks/postinstall');
module.exports = {
build: buildTask,
@ -30,5 +29,4 @@ module.exports = {
testAll: testAllTask,
testBrowser: testBrowserTask,
testServer: testServerTask,
postinstall: postinstallTask,
};

View file

@ -1,44 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const resolve = require('path').resolve;
const statSync = require('fs').statSync;
module.exports = function(plugin) {
if (
fileExists(resolve(plugin.root, '../kibana/package.json')) &&
!fileExists(resolve(plugin.root, '../../kibana/package.json'))
) {
process.stdout.write(
'\nWARNING: Kibana now requires that plugins must be located in ' +
'`../kibana-extra/{pluginName}` relative to the Kibana folder ' +
'during development. We found a Kibana in `../kibana`, but not in ' +
'`../../kibana`.\n'
);
}
};
function fileExists(path) {
try {
const stat = statSync(path);
return stat.isFile();
} catch (e) {
return false;
}
}