Skip to content

Commit

Permalink
debug running
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Mar 7, 2024
1 parent 074cac6 commit 14f75a7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
22 changes: 18 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require("path");
const fs = require("fs");
const core = require("@actions/core");
const tc = require("@actions/tool-cache");

Expand All @@ -15,13 +16,22 @@ async function setup() {
// Get version of tool to be installed
const version = core.getInput("version");

const pathToCr = await tc.downloadTool(getCrDownloadUrl(version));
const pathToCaps = await tc.downloadTool(getCapsDownloadUrl(version));
const pathToCr = await tc.downloadTool(
getCrDownloadUrl(version),
"/home/runner/bin/cr"
);
const pathToCaps = await tc.downloadTool(
getCapsDownloadUrl(version),
"/home/runner/bin/caps"
);

// Expose the tool by adding it to the PATH
fs.chmodSync(pathToCr, 0o755);
core.addPath(path.dirname(pathToCr));

console.log(`add to path: ${pathToCr}`);

fs.chmodSync(pathToCaps, 0o755);
core.addPath(path.dirname(pathToCaps));
console.log(`add to path: ${pathToCaps}`);
} catch (e) {
Expand Down

0 comments on commit 14f75a7

Please sign in to comment.