Skip to content

Commit

Permalink
Revert "Default to converting folder name for cli plugin to kebab-case (
Browse files Browse the repository at this point in the history
opensearch-project#357)"

This reverts commit 747ef8e.

Reverting for now because the full impact is not known and requires
subsequent commits to mitigate confusion related to CLI output.

Also, it seems like in the code there exists verification on the code
that plugins should explicitly be camelCase. So this merits more
discussion.

Issues related:
opensearch-project#322
opensearch-project#465
opensearch-project#366

Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Jul 1, 2021
1 parent 570858a commit c0bf3ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
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

0 comments on commit c0bf3ce

Please sign in to comment.