You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	fix: log which token will be used (#3665)
this just helps debugging issues like #3661 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							a3867c8ccb
						
					
				
				
					commit
					1d2842c419
				
			
							
								
								
									
										2
									
								
								internal/pipe/env/env.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								internal/pipe/env/env.go
									
									
									
									
										vendored
									
									
								
							| @@ -140,6 +140,7 @@ func checkErrors(ctx *context.Context, noTokens, noTokenErrs bool, gitlabTokenEr | ||||
| func loadEnv(env, path string) (string, error) { | ||||
| 	val := os.Getenv(env) | ||||
| 	if val != "" { | ||||
| 		log.Infof("using token from %q", "$"+env) | ||||
| 		return val, nil | ||||
| 	} | ||||
| 	path, err := homedir.Expand(path) | ||||
| @@ -154,6 +155,7 @@ func loadEnv(env, path string) (string, error) { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	defer f.Close() | ||||
| 	log.Infof("using token from %q", path) | ||||
| 	bts, _, err := bufio.NewReader(f).ReadLine() | ||||
| 	return string(bts), err | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user