Skip to content

Commit

Permalink
fix arch sufix
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola committed Feb 17, 2025
1 parent 2cb4431 commit efafc12
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions javascript/packages/cli/src/actions/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import cliProgress from "cli-progress";
import fs from "fs";
import path from "path";

const debug = require("debug")("zombie-cli::setup");

interface OptIf {
[key: string]: { name: string; url?: string; size?: string };
}
Expand Down Expand Up @@ -53,7 +55,7 @@ export async function setup(params: any, opts?: any) {
const arch_sufix = process.arch === "arm64" ? "aarch64-apple-darwin" : "";

await new Promise<void>((resolve) => {
latestPolkadotReleaseURL(POLKADOT_SDK, `${POLKADOT}-${arch_sufix}`).then(
latestPolkadotReleaseURL(POLKADOT_SDK, `${POLKADOT}${arch_sufix ? '-' + arch_sufix : ''}`).then(
(res: [string, string]) => {
options[POLKADOT] = {
name: POLKADOT,
Expand All @@ -68,7 +70,7 @@ export async function setup(params: any, opts?: any) {
await new Promise<void>((resolve) => {
latestPolkadotReleaseURL(
POLKADOT_SDK,
`${POLKADOT_PREPARE_WORKER}-${arch_sufix}`,
`${POLKADOT_PREPARE_WORKER}${arch_sufix ? '-' + arch_sufix : ''}`,
).then((res: [string, string]) => {
options[POLKADOT_PREPARE_WORKER] = {
name: POLKADOT_PREPARE_WORKER,
Expand All @@ -82,7 +84,7 @@ export async function setup(params: any, opts?: any) {
await new Promise<void>((resolve) => {
latestPolkadotReleaseURL(
POLKADOT_SDK,
`${POLKADOT_EXECUTE_WORKER}-${arch_sufix}`,
`${POLKADOT_EXECUTE_WORKER}${arch_sufix ? '-' + arch_sufix : ''}`,
).then((res: [string, string]) => {
options[POLKADOT_EXECUTE_WORKER] = {
name: POLKADOT_EXECUTE_WORKER,
Expand All @@ -96,7 +98,7 @@ export async function setup(params: any, opts?: any) {
await new Promise<void>((resolve) => {
latestPolkadotReleaseURL(
POLKADOT_SDK,
`${POLKADOT_PARACHAIN}-${arch_sufix}`,
`${POLKADOT_PARACHAIN}${arch_sufix ? '-' + arch_sufix : ''}`,
).then((res: [string, string]) => {
options[POLKADOT_PARACHAIN] = {
name: POLKADOT_PARACHAIN,
Expand Down Expand Up @@ -199,6 +201,7 @@ const downloadBinaries = async (binaries: string[]): Promise<void> => {
cliProgress.Presets.shades_grey,
);

debug("Download info:", options);
for (const binary of binaries) {
promises.push(
new Promise<void>(async (resolve) => {
Expand Down

0 comments on commit efafc12

Please sign in to comment.