Skip to content

Commit

Permalink
remove usage of 'core.addPath'
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <adeza@anchore.com>
  • Loading branch information
Alfredo Deza committed Nov 5, 2020
1 parent 56abf48 commit 25008c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions dist/index.js
Expand Up @@ -1493,7 +1493,8 @@ async function downloadGrype(version) {
let grypePath = `${installPath}_grype/grype`;

// Cache the downloaded file
return cache.cacheFile(grypePath, `grype`, `grype`, version);
cache.cacheFile(grypePath, `grype`, `grype`, version);
return grypePath;
}

async function installGrype(version) {
Expand All @@ -1503,8 +1504,7 @@ async function installGrype(version) {
grypePath = await downloadGrype(version);
}

// Add tool to path for this and future actions to use
core.addPath(grypePath);
return grypePath;
}

function sourceScheme() {
Expand Down Expand Up @@ -1589,7 +1589,7 @@ async function run() {
}

core.debug(`Installing grype version ${version}`);
await installGrype(version);
let grypePath = await installGrype(version);

core.debug("Image: " + source);
core.debug("Debug Output: " + debug);
Expand All @@ -1601,7 +1601,7 @@ async function run() {

// Run the grype analyzer
let cmdOutput = "";
let cmd = `${grypeBinary}`;
let cmd = `${grypePath}`;
let cmdArgs = [`-vv`, `-o`, `json`];
if (severityCutoff != "") {
cmdArgs.push("--fail-on");
Expand Down
10 changes: 5 additions & 5 deletions index.js
Expand Up @@ -414,7 +414,8 @@ async function downloadGrype(version) {
let grypePath = `${installPath}_grype/grype`;

// Cache the downloaded file
return cache.cacheFile(grypePath, `grype`, `grype`, version);
cache.cacheFile(grypePath, `grype`, `grype`, version);
return grypePath;
}

async function installGrype(version) {
Expand All @@ -424,8 +425,7 @@ async function installGrype(version) {
grypePath = await downloadGrype(version);
}

// Add tool to path for this and future actions to use
core.addPath(grypePath);
return grypePath;
}

function sourceScheme() {
Expand Down Expand Up @@ -510,7 +510,7 @@ async function run() {
}

core.debug(`Installing grype version ${version}`);
await installGrype(version);
let grypePath = await installGrype(version);

core.debug("Image: " + source);
core.debug("Debug Output: " + debug);
Expand All @@ -522,7 +522,7 @@ async function run() {

// Run the grype analyzer
let cmdOutput = "";
let cmd = `${grypeBinary}`;
let cmd = `${grypePath}`;
let cmdArgs = [`-vv`, `-o`, `json`];
if (severityCutoff != "") {
cmdArgs.push("--fail-on");
Expand Down

0 comments on commit 25008c6

Please sign in to comment.