Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Default to converting folder name for cli plugin to kebab-case (#347)" #578

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/cli_plugin/install/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { cleanPrevious, cleanArtifacts } from './cleanup';
import { extract, getPackData } from './pack';
import { renamePlugin } from './rename';
import { existingInstall, assertVersion } from './opensearch_dashboards';
import { kebabCase } from 'lodash';

const mkdir = promisify(Fs.mkdir);

Expand All @@ -63,7 +62,7 @@ export async function install(settings, logger) {

assertVersion(settings);

const targetDir = path.join(settings.pluginDir, kebabCase(settings.plugins[0].id));
const targetDir = path.join(settings.pluginDir, settings.plugins[0].id);
await renamePlugin(settings.workingPath, targetDir);

logger.log('Plugin installation complete');
Expand Down
3 changes: 1 addition & 2 deletions src/cli_plugin/install/opensearch_dashboards.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@

import path from 'path';
import { statSync } from 'fs';
import { kebabCase } from 'lodash';

import { versionSatisfies, cleanVersion } from '../../legacy/utils/version';

export function existingInstall(settings, logger) {
try {
statSync(path.join(settings.pluginDir, kebabCase(settings.plugins[0].id)));
statSync(path.join(settings.pluginDir, settings.plugins[0].id));

logger.error(
`Plugin ${settings.plugins[0].id} already exists, please remove before installing a new version`
Expand Down