1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2025-03-31 05:20:06 +02:00

Remove unneeded commit information from stdout

This commit is contained in:
Thomas Boop 2020-09-10 17:22:02 -04:00
parent 21dc310f19
commit 0e8d9f459e
2 changed files with 7 additions and 4 deletions

5
dist/index.js vendored
View file

@ -5885,7 +5885,7 @@ class GitCommandManager {
} }
log1() { log1() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const output = yield this.execGit(['log', '-1']); const output = yield this.execGit(['log', '-1'], false, true);
return output.stdout; return output.stdout;
}); });
} }
@ -6007,7 +6007,7 @@ class GitCommandManager {
return result; return result;
}); });
} }
execGit(args, allowAllExitCodes = false) { execGit(args, allowAllExitCodes = false, silent = false) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
fshelper.directoryExistsSync(this.workingDirectory, true); fshelper.directoryExistsSync(this.workingDirectory, true);
const result = new GitOutput(); const result = new GitOutput();
@ -6022,6 +6022,7 @@ class GitCommandManager {
const options = { const options = {
cwd: this.workingDirectory, cwd: this.workingDirectory,
env, env,
silent,
ignoreReturnCode: allowAllExitCodes, ignoreReturnCode: allowAllExitCodes,
listeners: { listeners: {
stdout: (data) => { stdout: (data) => {

View file

@ -255,7 +255,7 @@ class GitCommandManager {
} }
async log1(): Promise<string> { async log1(): Promise<string> {
const output = await this.execGit(['log', '-1']) const output = await this.execGit(['log', '-1'], false, true)
return output.stdout return output.stdout
} }
@ -390,7 +390,8 @@ class GitCommandManager {
private async execGit( private async execGit(
args: string[], args: string[],
allowAllExitCodes = false allowAllExitCodes = false,
silent = false
): Promise<GitOutput> { ): Promise<GitOutput> {
fshelper.directoryExistsSync(this.workingDirectory, true) fshelper.directoryExistsSync(this.workingDirectory, true)
@ -409,6 +410,7 @@ class GitCommandManager {
const options = { const options = {
cwd: this.workingDirectory, cwd: this.workingDirectory,
env, env,
silent,
ignoreReturnCode: allowAllExitCodes, ignoreReturnCode: allowAllExitCodes,
listeners: { listeners: {
stdout: (data: Buffer) => { stdout: (data: Buffer) => {