X Tutup
Skip to content

Commit cfbfb57

Browse files
committed
Read Executable from factory instead of from stdlib
1 parent 98f1f5e commit cfbfb57

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmd/gh/main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ func main() {
163163

164164
newRelease := <-updateMessageChan
165165
if newRelease != nil {
166-
isHomebrew := false
167-
if ghExe, err := os.Executable(); err == nil {
168-
isHomebrew = isUnderHomebrew(ghExe)
169-
}
166+
isHomebrew := isUnderHomebrew(cmdFactory.Executable)
170167
if isHomebrew && isRecentRelease(newRelease.PublishedAt) {
171168
// do not notify Homebrew users before the version bump had a chance to get merged into homebrew-core
172169
return

0 commit comments

Comments
 (0)
X Tutup