Skip to content

Commit

Permalink
Fix Windows plugins download path
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Sep 6, 2023
1 parent d3388c5 commit d6e3476
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cli_plugin/install/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ function generateUrls({ version, plugin }) {
}

function generatePluginUrl(version, plugin) {
const platform = process.platform === 'win32' ? 'windows' : process.platform;
const [platform, type] =
process.platform === 'win32' ? ['windows', 'zip'] : [process.platform, 'tar'];
const arch = process.arch === 'arm64' ? 'arm64' : 'x64';

return `${LATEST_PLUGIN_BASE_URL}/${version}/latest/${platform}/${arch}/tar/builds/opensearch-dashboards/plugins/${plugin}-${version}.zip`;
return `${LATEST_PLUGIN_BASE_URL}/${version}/latest/${platform}/${arch}/${type}/builds/opensearch-dashboards/plugins/${plugin}-${version}.zip`;
}

export function parseMilliseconds(val) {
Expand Down

0 comments on commit d6e3476

Please sign in to comment.