File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 123
123
app . verbose ( `End of uploader: ${ end - start } milliseconds` , argv . verbose )
124
124
} )
125
125
. catch ( error => {
126
- app . log ( `Error!: ${ error } ` , { level : 'error' , argv } )
126
+ app . error ( `Error!: ${ error } ` )
127
127
const end = Date . now ( )
128
128
app . verbose ( `End of uploader: ${ end - start } milliseconds` , argv . verbose )
129
129
process . exit ( argv . nonZero ? - 1 : 0 )
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ function fetchGitRoot() {
196
196
) . trimRight ( )
197
197
} catch ( error ) {
198
198
logAndThrow ( 'Error fetching git root. Please try using the -R flag.' )
199
+ return '.'
199
200
}
200
201
}
201
202
@@ -206,7 +207,8 @@ function fetchGitRoot() {
206
207
*/
207
208
function parseGitIgnore ( projectRoot ) {
208
209
const gitIgnorePath = path . join ( projectRoot , '.gitignore' )
209
- let lines
210
+ /** @type {string[] } */
211
+ let lines = [ ]
210
212
try {
211
213
lines = readAllLines ( gitIgnorePath ) || [ ]
212
214
} catch ( error ) {
@@ -226,6 +228,7 @@ function parseGitIgnore(projectRoot) {
226
228
* @param {string } projectRoot Root of the project
227
229
* @param {string } dirPath Directory to search in
228
230
* @param {Object } args
231
+ * @param {boolean } [args.verbose]
229
232
* @param {string[] } arrayOfFiles
230
233
* @returns {string[] }
231
234
*/
@@ -280,6 +283,7 @@ function readCoverageFile(projectRoot, filePath) {
280
283
} catch ( error ) {
281
284
logAndThrow ( `There was an error reading the coverage file: ${ error } ` )
282
285
}
286
+ return ''
283
287
}
284
288
285
289
function endNetworkMarker ( ) {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ async function main(args) {
93
93
94
94
if ( ! args . feature || args . feature . split ( ',' ) . includes ( 'network' ) === false ) {
95
95
verbose ( 'Start of network processing...' , args . verbose )
96
- let fileListing
96
+ let fileListing = ''
97
97
try {
98
98
fileListing = await fileHelpers . getFileListing ( projectRoot , args )
99
99
} catch ( error ) {
@@ -199,6 +199,7 @@ async function main(args) {
199
199
200
200
if ( serviceParams === undefined ) {
201
201
logAndThrow ( 'Unable to detect service, please specify manually.' )
202
+ process . exit ( args . nonZero ? - 1 : 0 )
202
203
}
203
204
204
205
// == Step 8: either upload or dry-run
@@ -218,14 +219,14 @@ async function main(args) {
218
219
)
219
220
verbose ( `Passed token was ${ token . length } characters long` , args . verbose )
220
221
try {
221
- info (
222
+ verbose (
222
223
`${ uploadHost } /upload/v4?package=${ webHelpers . getPackage (
223
224
args . source ,
224
225
) } &${ query }
225
226
Content-Type: 'text/plain'
226
227
Content-Encoding: 'gzip'
227
228
X-Reduced-Redundancy: 'false'` ,
228
- { level : 'debug' , args } ,
229
+ args . verbose ,
229
230
)
230
231
231
232
const uploadURL = await webHelpers . uploadToCodecov (
You can’t perform that action at this time.
0 commit comments