Update silent to false

This commit is contained in:
Tonye Jack 2023-05-24 17:32:33 -06:00
parent d99c0ae3f3
commit 77502dd673
3 changed files with 37 additions and 37 deletions

36
dist/index.js generated vendored
View File

@ -1131,7 +1131,7 @@ const versionToNumber = (version) => {
return major * 1000000 + minor * 1000 + patch; return major * 1000000 + minor * 1000 + patch;
}; };
const verifyMinimumGitVersion = () => __awaiter(void 0, void 0, void 0, function* () { const verifyMinimumGitVersion = () => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['--version'], { silent: true }); const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['--version'], { silent: false });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'An unexpected error occurred'); throw new Error(stderr || 'An unexpected error occurred');
} }
@ -1261,7 +1261,7 @@ exports.getFilesFromSourceFile = getFilesFromSourceFile;
const updateGitGlobalConfig = ({ name, value }) => __awaiter(void 0, void 0, void 0, function* () { const updateGitGlobalConfig = ({ name, value }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stderr } = yield exec.getExecOutput('git', ['config', '--global', name, value], { const { exitCode, stderr } = yield exec.getExecOutput('git', ['config', '--global', name, value], {
ignoreReturnCode: true, ignoreReturnCode: true,
silent: true silent: false
}); });
/* istanbul ignore if */ /* istanbul ignore if */
if (exitCode !== 0 || stderr) { if (exitCode !== 0 || stderr) {
@ -1272,7 +1272,7 @@ exports.updateGitGlobalConfig = updateGitGlobalConfig;
const isRepoShallow = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { const isRepoShallow = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', '--is-shallow-repository'], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', '--is-shallow-repository'], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'An unexpected error occurred'); throw new Error(stderr || 'An unexpected error occurred');
@ -1283,7 +1283,7 @@ exports.isRepoShallow = isRepoShallow;
const submoduleExists = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { const submoduleExists = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['submodule', 'status'], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['submodule', 'status'], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'An unexpected error occurred'); throw new Error(stderr || 'An unexpected error occurred');
@ -1294,7 +1294,7 @@ exports.submoduleExists = submoduleExists;
const gitFetch = ({ args, cwd }) => __awaiter(void 0, void 0, void 0, function* () { const gitFetch = ({ args, cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stderr } = yield exec.getExecOutput('git', ['fetch', '-q', ...args], { const { exitCode, stderr } = yield exec.getExecOutput('git', ['fetch', '-q', ...args], {
cwd, cwd,
silent: true silent: false
}); });
/* istanbul ignore if */ /* istanbul ignore if */
if (exitCode !== 0) { if (exitCode !== 0) {
@ -1306,7 +1306,7 @@ exports.gitFetch = gitFetch;
const gitFetchSubmodules = ({ args, cwd }) => __awaiter(void 0, void 0, void 0, function* () { const gitFetchSubmodules = ({ args, cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stderr } = yield exec.getExecOutput('git', ['submodule', 'foreach', 'git', 'fetch', '-q', ...args], { const { exitCode, stderr } = yield exec.getExecOutput('git', ['submodule', 'foreach', 'git', 'fetch', '-q', ...args], {
cwd, cwd,
silent: true silent: false
}); });
/* istanbul ignore if */ /* istanbul ignore if */
if (exitCode !== 0) { if (exitCode !== 0) {
@ -1317,7 +1317,7 @@ exports.gitFetchSubmodules = gitFetchSubmodules;
const getSubmodulePath = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { const getSubmodulePath = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['submodule', 'status'], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['submodule', 'status'], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
core.warning(stderr || "Couldn't get submodule names"); core.warning(stderr || "Couldn't get submodule names");
@ -1333,7 +1333,7 @@ const gitSubmoduleDiffSHA = ({ cwd, parentSha1, parentSha2, submodulePath, diff
var _a, _b, _c, _d; var _a, _b, _c, _d;
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['diff', parentSha1, parentSha2, '--', submodulePath], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['diff', parentSha1, parentSha2, '--', submodulePath], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'An unexpected error occurred'); throw new Error(stderr || 'An unexpected error occurred');
@ -1359,7 +1359,7 @@ const gitRenamedFiles = ({ cwd, sha1, sha2, diff, oldNewSeparator, isSubmodule =
`${sha1}${diff}${sha2}` `${sha1}${diff}${sha2}`
], { ], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
if (isSubmodule) { if (isSubmodule) {
@ -1391,7 +1391,7 @@ const gitDiff = ({ cwd, sha1, sha2, diff, diffFilter, filePatterns = [], isSubmo
`${sha1}${diff}${sha2}` `${sha1}${diff}${sha2}`
], { ], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
if (isSubmodule) { if (isSubmodule) {
@ -1417,7 +1417,7 @@ exports.gitDiff = gitDiff;
const gitLog = ({ args, cwd }) => __awaiter(void 0, void 0, void 0, function* () { const gitLog = ({ args, cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['log', ...args], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['log', ...args], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'An unexpected error occurred'); throw new Error(stderr || 'An unexpected error occurred');
@ -1428,7 +1428,7 @@ exports.gitLog = gitLog;
const getHeadSha = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { const getHeadSha = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', 'HEAD'], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', 'HEAD'], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'Unable to get HEAD sha'); throw new Error(stderr || 'Unable to get HEAD sha');
@ -1439,7 +1439,7 @@ exports.getHeadSha = getHeadSha;
const getParentHeadSha = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { const getParentHeadSha = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', 'HEAD^'], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', 'HEAD^'], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'Unable to get HEAD^ sha'); throw new Error(stderr || 'Unable to get HEAD^ sha');
@ -1450,7 +1450,7 @@ exports.getParentHeadSha = getParentHeadSha;
const getBranchHeadSha = ({ branch, cwd }) => __awaiter(void 0, void 0, void 0, function* () { const getBranchHeadSha = ({ branch, cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', branch], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['rev-parse', branch], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || `Unable to get ${branch} head sha`); throw new Error(stderr || `Unable to get ${branch} head sha`);
@ -1461,7 +1461,7 @@ exports.getBranchHeadSha = getBranchHeadSha;
const verifyCommitSha = ({ sha, cwd, showAsErrorMessage = true }) => __awaiter(void 0, void 0, void 0, function* () { const verifyCommitSha = ({ sha, cwd, showAsErrorMessage = true }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stderr } = yield exec.getExecOutput('git', ['rev-parse', '--quiet', '--verify', `${sha}^{commit}`], { const { exitCode, stderr } = yield exec.getExecOutput('git', ['rev-parse', '--quiet', '--verify', `${sha}^{commit}`], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
if (showAsErrorMessage) { if (showAsErrorMessage) {
@ -1480,7 +1480,7 @@ exports.verifyCommitSha = verifyCommitSha;
const getPreviousGitTag = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { const getPreviousGitTag = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['tag', '--sort=-version:refname'], { const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['tag', '--sort=-version:refname'], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
throw new Error(stderr || 'Unable to get previous tag'); throw new Error(stderr || 'Unable to get previous tag');
@ -1493,7 +1493,7 @@ const getPreviousGitTag = ({ cwd }) => __awaiter(void 0, void 0, void 0, functio
const previousTag = tags[1]; const previousTag = tags[1];
const { exitCode: exitCode2, stdout: stdout2, stderr: stderr2 } = yield exec.getExecOutput('git', ['rev-parse', previousTag], { const { exitCode: exitCode2, stdout: stdout2, stderr: stderr2 } = yield exec.getExecOutput('git', ['rev-parse', previousTag], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode2 !== 0) { if (exitCode2 !== 0) {
throw new Error(stderr2 || 'Unable to get previous tag'); throw new Error(stderr2 || 'Unable to get previous tag');
@ -1505,7 +1505,7 @@ exports.getPreviousGitTag = getPreviousGitTag;
const canDiffCommits = ({ cwd, sha1, sha2, diff }) => __awaiter(void 0, void 0, void 0, function* () { const canDiffCommits = ({ cwd, sha1, sha2, diff }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stderr } = yield exec.getExecOutput('git', ['diff', '--name-only', '--ignore-submodules=all', `${sha1}${diff}${sha2}`], { const { exitCode, stderr } = yield exec.getExecOutput('git', ['diff', '--name-only', '--ignore-submodules=all', `${sha1}${diff}${sha2}`], {
cwd, cwd,
silent: true silent: false
}); });
if (exitCode !== 0) { if (exitCode !== 0) {
core.warning(stderr || `Unable find merge base between ${sha1} and ${sha2}`); core.warning(stderr || `Unable find merge base between ${sha1} and ${sha2}`);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@ export const verifyMinimumGitVersion = async (): Promise<void> => {
const {exitCode, stdout, stderr} = await exec.getExecOutput( const {exitCode, stdout, stderr} = await exec.getExecOutput(
'git', 'git',
['--version'], ['--version'],
{silent: true} {silent: false}
) )
if (exitCode !== 0) { if (exitCode !== 0) {
@ -143,7 +143,7 @@ export const updateGitGlobalConfig = async ({
['config', '--global', name, value], ['config', '--global', name, value],
{ {
ignoreReturnCode: true, ignoreReturnCode: true,
silent: true silent: false
} }
) )
@ -159,7 +159,7 @@ export const isRepoShallow = async ({cwd}: {cwd: string}): Promise<boolean> => {
['rev-parse', '--is-shallow-repository'], ['rev-parse', '--is-shallow-repository'],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -180,7 +180,7 @@ export const submoduleExists = async ({
['submodule', 'status'], ['submodule', 'status'],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -203,7 +203,7 @@ export const gitFetch = async ({
['fetch', '-q', ...args], ['fetch', '-q', ...args],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -227,7 +227,7 @@ export const gitFetchSubmodules = async ({
['submodule', 'foreach', 'git', 'fetch', '-q', ...args], ['submodule', 'foreach', 'git', 'fetch', '-q', ...args],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -247,7 +247,7 @@ export const getSubmodulePath = async ({
['submodule', 'status'], ['submodule', 'status'],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -280,7 +280,7 @@ export const gitSubmoduleDiffSHA = async ({
['diff', parentSha1, parentSha2, '--', submodulePath], ['diff', parentSha1, parentSha2, '--', submodulePath],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -334,7 +334,7 @@ export const gitRenamedFiles = async ({
], ],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -394,7 +394,7 @@ export const gitDiff = async ({
], ],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -439,7 +439,7 @@ export const gitLog = async ({
['log', ...args], ['log', ...args],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -456,7 +456,7 @@ export const getHeadSha = async ({cwd}: {cwd: string}): Promise<string> => {
['rev-parse', 'HEAD'], ['rev-parse', 'HEAD'],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -477,7 +477,7 @@ export const getParentHeadSha = async ({
['rev-parse', 'HEAD^'], ['rev-parse', 'HEAD^'],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -500,7 +500,7 @@ export const getBranchHeadSha = async ({
['rev-parse', branch], ['rev-parse', branch],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -525,7 +525,7 @@ export const verifyCommitSha = async ({
['rev-parse', '--quiet', '--verify', `${sha}^{commit}`], ['rev-parse', '--quiet', '--verify', `${sha}^{commit}`],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -555,7 +555,7 @@ export const getPreviousGitTag = async ({
['tag', '--sort=-version:refname'], ['tag', '--sort=-version:refname'],
{ {
cwd, cwd,
silent: true silent: false
} }
) )
@ -578,7 +578,7 @@ export const getPreviousGitTag = async ({
stderr: stderr2 stderr: stderr2
} = await exec.getExecOutput('git', ['rev-parse', previousTag], { } = await exec.getExecOutput('git', ['rev-parse', previousTag], {
cwd, cwd,
silent: true silent: false
}) })
if (exitCode2 !== 0) { if (exitCode2 !== 0) {
@ -606,7 +606,7 @@ export const canDiffCommits = async ({
['diff', '--name-only', '--ignore-submodules=all', `${sha1}${diff}${sha2}`], ['diff', '--name-only', '--ignore-submodules=all', `${sha1}${diff}${sha2}`],
{ {
cwd, cwd,
silent: true silent: false
} }
) )