use ToolRunner directly instead of exec wrapper
This commit is contained in:
parent
80e2c4fe4a
commit
c3d6602e8a
12 changed files with 60 additions and 60 deletions
8
lib/external-queries.js
generated
8
lib/external-queries.js
generated
|
|
@ -8,7 +8,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const exec = __importStar(require("@actions/exec"));
|
||||
const toolrunnner = __importStar(require("@actions/exec/lib/toolrunner"));
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
/**
|
||||
|
|
@ -23,12 +23,12 @@ async function checkoutExternalRepository(repository, ref, githubUrl, tempDir) {
|
|||
}
|
||||
if (!fs.existsSync(checkoutLocation)) {
|
||||
const repoURL = githubUrl + '/' + repository + '.git';
|
||||
await exec.exec('git', ['clone', repoURL, checkoutLocation]);
|
||||
await exec.exec('git', [
|
||||
await new toolrunnner.ToolRunner('git', ['clone', repoURL, checkoutLocation]).exec();
|
||||
await new toolrunnner.ToolRunner('git', [
|
||||
'--work-tree=' + checkoutLocation,
|
||||
'--git-dir=' + checkoutLocation + '/.git',
|
||||
'checkout', ref,
|
||||
]);
|
||||
]).exec();
|
||||
}
|
||||
return checkoutLocation;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue