mirror of
https://github.com/ryanccn/attic-action.git
synced 2024-11-19 22:16:35 +00:00
fix: check installed using @actions/io
Some checks failed
Test / test-cache (macos-latest) (push) Has been cancelled
Test / test-cache (ubuntu-latest) (push) Has been cancelled
Some checks failed
Test / test-cache (macos-latest) (push) Has been cancelled
Test / test-cache (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
parent
55e6e8d853
commit
cdb11a7aa0
3 changed files with 6 additions and 2 deletions
|
@ -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": {
|
||||
|
|
|
@ -14,6 +14,9 @@ importers:
|
|||
'@actions/exec':
|
||||
specifier: ^1.1.1
|
||||
version: 1.1.1
|
||||
'@actions/io':
|
||||
specifier: ^1.1.3
|
||||
version: 1.1.3
|
||||
just-split:
|
||||
specifier: ^3.2.0
|
||||
version: 3.2.0
|
||||
|
|
|
@ -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");
|
||||
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue