mirror of
https://github.com/gogf/gf.git
synced 2025-04-05 03:05:05 +08:00
fix(cmd/gf): invalid binary suffix after installing binary using custom renamed file name that has suffix with .
character (#4207)
This commit is contained in:
parent
07696fc779
commit
abf77fac50
@ -162,8 +162,14 @@ func (s serviceInstall) getGoPathBin() string {
|
||||
func (s serviceInstall) getAvailablePaths() []serviceInstallAvailablePath {
|
||||
var (
|
||||
folderPaths []serviceInstallAvailablePath
|
||||
binaryFileName = "gf" + gfile.Ext(gfile.SelfPath())
|
||||
binaryFileName = "gf"
|
||||
)
|
||||
|
||||
// Windows binary file name suffix.
|
||||
if runtime.GOOS == "windows" {
|
||||
binaryFileName += ".exe"
|
||||
}
|
||||
|
||||
// $GOPATH/bin
|
||||
if goPathBin := s.getGoPathBin(); goPathBin != "" {
|
||||
folderPaths = s.checkAndAppendToAvailablePath(
|
||||
|
Loading…
x
Reference in New Issue
Block a user