refactor: simply EGITNOPERMISSION error parameters
This commit is contained in:
		
							parent
							
								
									0ab0426075
								
							
						
					
					
						commit
						24a8052038
					
				
							
								
								
									
										3
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								index.js
									
									
									
									
									
								
							| @ -54,7 +54,6 @@ async function run(options, plugins) { | |||||||
| 
 | 
 | ||||||
|   await verify(options); |   await verify(options); | ||||||
| 
 | 
 | ||||||
|   const {repositoryUrl} = options; |  | ||||||
|   options.repositoryUrl = await getGitAuthUrl(options); |   options.repositoryUrl = await getGitAuthUrl(options); | ||||||
| 
 | 
 | ||||||
|   if (!(await isBranchUpToDate(options.branch))) { |   if (!(await isBranchUpToDate(options.branch))) { | ||||||
| @ -69,7 +68,7 @@ async function run(options, plugins) { | |||||||
|     await verifyAuth(options.repositoryUrl, options.branch); |     await verifyAuth(options.repositoryUrl, options.branch); | ||||||
|   } catch (err) { |   } catch (err) { | ||||||
|     logger.error(`The command "${err.cmd}" failed with the error message %s.`, err.stderr); |     logger.error(`The command "${err.cmd}" failed with the error message %s.`, err.stderr); | ||||||
|     throw getError('EGITNOPERMISSION', {options, repositoryUrl}); |     throw getError('EGITNOPERMISSION', {options}); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   logger.log('Run automated release from branch %s', options.branch); |   logger.log('Run automated release from branch %s', options.branch); | ||||||
|  | |||||||
| @ -27,11 +27,11 @@ Please make sure to add the \`repositoryUrl\` to the [semantic-release configura | |||||||
|       'docs/usage/configuration.md' |       'docs/usage/configuration.md' | ||||||
|     )}).`,
 |     )}).`,
 | ||||||
|   }), |   }), | ||||||
|   EGITNOPERMISSION: ({options, repositoryUrl}) => ({ |   EGITNOPERMISSION: ({options}) => ({ | ||||||
|     message: 'The push permission to the Git repository is required.', |     message: 'The push permission to the Git repository is required.', | ||||||
|     details: `**semantic-release** cannot push the version tag to the branch \`${ |     details: `**semantic-release** cannot push the version tag to the branch \`${ | ||||||
|       options.branch |       options.branch | ||||||
|     }\` on remote Git repository with URL \`${repositoryUrl}\`.
 |     }\` on remote Git repository with URL \`${options.repositoryUrl}\`.
 | ||||||
| 
 | 
 | ||||||
| Please refer to the [authentication configuration documentation](${linkify( | Please refer to the [authentication configuration documentation](${linkify( | ||||||
|       'docs/usage/ci-configuration.md#authentication' |       'docs/usage/ci-configuration.md#authentication' | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user