Use @actions/io to locate binaries
This commit is contained in:
parent
64cc90bcd4
commit
b58f4471c8
36 changed files with 69 additions and 233 deletions
4
lib/git-utils.js
generated
4
lib/git-utils.js
generated
|
|
@ -38,7 +38,7 @@ exports.getRef = getRef;
|
|||
exports.isAnalyzingDefaultBranch = isAnalyzingDefaultBranch;
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
|
||||
const safeWhich = __importStar(require("@chrisgavin/safe-which"));
|
||||
const io = __importStar(require("@actions/io"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
const util_1 = require("./util");
|
||||
async function runGitCommand(checkoutPath, args, customErrorMessage) {
|
||||
|
|
@ -46,7 +46,7 @@ async function runGitCommand(checkoutPath, args, customErrorMessage) {
|
|||
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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue