Skip to content

Commit

Permalink
fix: check installed using @actions/io
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed Oct 6, 2024
1 parent 55e6e8d commit cdb11a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3",
"just-split": "^3.2.0"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions src/stages/install.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from "@actions/core";
import { exec } from "@actions/exec";
import { findInPath } from "@actions/io";

export const install = async () => {
core.startGroup("Install attic");
Expand All @@ -16,6 +17,5 @@ export const install = async () => {
};

export const isInstalled = async () => {
let returnCode = await exec("attic", ["-V"]);
return returnCode === 0;
return (await findInPath("attic")).length > 0;
};

0 comments on commit cdb11a7

Please sign in to comment.