소스 검색

Merge pull request #19630 from karalabe/fix-commit-strings

internal/build: fix Travis and AppVeyor commit string injection
Péter Szilágyi 6 년 전
부모
커밋
c4de228e18
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      internal/build/env.go

+ 2 - 2
internal/build/env.go

@@ -57,7 +57,7 @@ func Env() Environment {
 	case os.Getenv("CI") == "true" && os.Getenv("TRAVIS") == "true":
 		commit := os.Getenv("TRAVIS_PULL_REQUEST_SHA")
 		if commit == "" {
-			os.Getenv("TRAVIS_COMMIT")
+			commit = os.Getenv("TRAVIS_COMMIT")
 		}
 		return Environment{
 			Name:          "travis",
@@ -73,7 +73,7 @@ func Env() Environment {
 	case os.Getenv("CI") == "True" && os.Getenv("APPVEYOR") == "True":
 		commit := os.Getenv("APPVEYOR_PULL_REQUEST_HEAD_COMMIT")
 		if commit == "" {
-			os.Getenv("APPVEYOR_REPO_COMMIT")
+			commit = os.Getenv("APPVEYOR_REPO_COMMIT")
 		}
 		return Environment{
 			Name:          "appveyor",