Use @actions/io to locate binaries

This commit is contained in:
Henry Mercer 2024-12-19 14:21:06 +00:00
parent 64cc90bcd4
commit b58f4471c8
36 changed files with 69 additions and 233 deletions

View file

@ -1,6 +1,6 @@
import * as core from "@actions/core";
import * as toolrunner from "@actions/exec/lib/toolrunner";
import * as safeWhich from "@chrisgavin/safe-which";
import * as io from "@actions/io";
import {
getOptionalInput,
@ -18,7 +18,7 @@ async function runGitCommand(
let stderr = "";
core.debug(`Running git command: git ${args.join(" ")}`);
try {
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), args, {
await new toolrunner.ToolRunner(await io.which("git", true), args, {
silent: true,
listeners: {
stdout: (data) => {