File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -116,16 +116,24 @@ async function doLicenseCommit(changedFiles) {
116
116
117
117
const hasDiff = await git . diff ( ) ;
118
118
119
- if ( ! hasDiff ) return ;
119
+ if ( ! hasDiff ) {
120
+ console . log (
121
+ chalk `\n{red License pass caused no changes.} Skipping commit.\n`
122
+ ) ;
123
+ return ;
124
+ }
120
125
121
126
const gitSpinner = ora ( ' Creating automated license commit' ) . start ( ) ;
122
127
await git . add ( '.' ) ;
123
128
124
- await git . commit ( '[AUTOMATED]: License Headers' ) ;
129
+ const commit = await git . commit ( '[AUTOMATED]: License Headers' ) ;
125
130
126
131
gitSpinner . stopAndPersist ( {
127
132
symbol : '✅'
128
133
} ) ;
134
+ console . log (
135
+ chalk `{green Commited ${ commit . commit } to branch ${ commit . branch } }`
136
+ ) ;
129
137
}
130
138
131
139
module . exports = {
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ async function doPrettierCommit(changedFiles) {
105
105
symbol : '✅'
106
106
} ) ;
107
107
console . log (
108
- chalk `\n {green Commited ${ commit . commit } to branch ${ commit . branch } }`
108
+ chalk `{green Commited ${ commit . commit } to branch ${ commit . branch } }`
109
109
) ;
110
110
}
111
111
You can’t perform that action at this time.
0 commit comments