fix(dev-infra): don't pollute standard out during commit message hooks (#42871)
When a commit message is not restored, there is not need to log this to stdout. It is a better experience to silently succeed. PR Close #42871
This commit is contained in:
parent
0ce8f6e62d
commit
53279262be
|
@ -21,7 +21,6 @@ import {CommitMsgSource} from './commit-message-source';
|
||||||
*/
|
*/
|
||||||
export function restoreCommitMessage(filePath: string, source?: CommitMsgSource) {
|
export function restoreCommitMessage(filePath: string, source?: CommitMsgSource) {
|
||||||
if (!!source) {
|
if (!!source) {
|
||||||
log('Skipping commit message restoration attempt');
|
|
||||||
if (source === 'message') {
|
if (source === 'message') {
|
||||||
debug('A commit message was already provided via the command with a -m or -F flag');
|
debug('A commit message was already provided via the command with a -m or -F flag');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1777,7 +1777,6 @@ function saveCommitMessageDraft(basePath, commitMessage) {
|
||||||
*/
|
*/
|
||||||
function restoreCommitMessage(filePath, source) {
|
function restoreCommitMessage(filePath, source) {
|
||||||
if (!!source) {
|
if (!!source) {
|
||||||
log('Skipping commit message restoration attempt');
|
|
||||||
if (source === 'message') {
|
if (source === 'message') {
|
||||||
debug('A commit message was already provided via the command with a -m or -F flag');
|
debug('A commit message was already provided via the command with a -m or -F flag');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue