Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Sep 11, 2024
1 parent 1083552 commit 1d8991e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ outputs:
description: "The Deno version that was installed."
is-canary:
description: "If the installed Deno version was a canary version."
deno-binary-name:
description: The name to use for the binary.
runs:
using: "node20"
main: "main.js"
5 changes: 1 addition & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@ async function main() {
} version ${version.version}.`,
);

const binaryName = core.getInput("deno-binary-name");

await install(version, binaryName);
await install(version);

core.setOutput("deno-version", version.version);
core.setOutput("is-canary", version.isCanary);
core.setOutput("deno-binary-name", binaryName);

core.info("Installation complete.");
} catch (err) {
Expand Down
4 changes: 2 additions & 2 deletions src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ const tc = require("@actions/tool-cache");

/**
* @param {import("./version").Version} version
* @param {string} binaryName
*/
async function install(version, binaryName) {
async function install(version) {
const cachedPath = tc.find(
"deno",
version.isCanary ? `0.0.0-${version.version}` : version.version,
Expand All @@ -30,6 +29,7 @@ async function install(version, binaryName) {
const zipPath = await tc.downloadTool(url);
const extractedFolder = await tc.extractZip(zipPath);

const binaryName = core.getInput("deno-binary-name");
if (binaryName !== "deno") {
await fs.rename(
path.join(extractedFolder, "deno"),
Expand Down

0 comments on commit 1d8991e

Please sign in to comment.