From 5f8f393fa8027df3908d3fcc8cdede8db1cb37cf Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Mon, 9 Aug 2021 16:20:46 +0200 Subject: [PATCH] Fix vessel install. --- dist/index.js | 5 +++-- src/main.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index e1e1ffb..ed8f2ba 100644 --- a/dist/index.js +++ b/dist/index.js @@ -55,8 +55,9 @@ function run() { // Opt-out of having data collected about dfx usage. core.exportVariable('DFX_TELEMETRY_DISABLED', 1); // Install dfx. - child_process_1.default.execSync(`echo y | DFX_VERSION=${dfxVersion} sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"`); + child_process_1.default.execSync(`mkdir -p /home/runner/bin`); core.addPath('/home/runner/bin'); + child_process_1.default.execSync(`echo y | DFX_VERSION=${dfxVersion} sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"`); const dfxPath = yield io.which('dfx'); core.debug(dfxPath); infoExec(`${dfxPath} --version`); @@ -79,7 +80,7 @@ function run() { // Install vessel. const vesselVersion = core.getInput('vessel-version'); if (vesselVersion) { - child_process_1.default.execSync(`curl -L https://github.com/dfinity/vessel/releases/download/v${vesselVersion}/vessel-linux64 > /home/runner/bin/vessel`); + child_process_1.default.execSync(`wget -O /home/runner/bin/vessel https://github.com/dfinity/vessel/releases/download/v${vesselVersion}/vessel-linux64`); child_process_1.default.execSync(`chmod +x /home/runner/bin/vessel`); const vesselPath = yield io.which('vessel'); infoExec(`${vesselPath} --version`); diff --git a/src/main.ts b/src/main.ts index 96ae62a..4d1afa8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,8 +17,9 @@ export async function run() { core.exportVariable('DFX_TELEMETRY_DISABLED', 1); // Install dfx. - cp.execSync(`echo y | DFX_VERSION=${dfxVersion} sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"`); + cp.execSync(`mkdir -p /home/runner/bin`); core.addPath('/home/runner/bin'); + cp.execSync(`echo y | DFX_VERSION=${dfxVersion} sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"`); const dfxPath = await io.which('dfx'); core.debug(dfxPath); @@ -46,7 +47,7 @@ export async function run() { // Install vessel. const vesselVersion = core.getInput('vessel-version'); if (vesselVersion) { - cp.execSync(`curl -L https://github.com/dfinity/vessel/releases/download/v${vesselVersion}/vessel-linux64 > /home/runner/bin/vessel`); + cp.execSync(`wget -O /home/runner/bin/vessel https://github.com/dfinity/vessel/releases/download/v${vesselVersion}/vessel-linux64`); cp.execSync(`chmod +x /home/runner/bin/vessel`); const vesselPath = await io.which('vessel');