forked from Silverfish/proton-bridge
GODT-1977: fix launcher for v2 to v3 updates.
This commit is contained in:
@ -72,6 +72,10 @@ func (v *Versioner) ListVersions() (Versions, error) {
|
||||
// GetExecutableInDirectory returns the full path to the executable in the given directory, if present.
|
||||
// It returns an error if the executable is missing or does not have executable permissions set.
|
||||
func (v *Versioner) GetExecutableInDirectory(name, directory string) (string, error) {
|
||||
return getExecutableInDirectory(name, directory)
|
||||
}
|
||||
|
||||
func getExecutableInDirectory(name, directory string) (string, error) {
|
||||
exe := filepath.Join(directory, getExeName(name))
|
||||
|
||||
if !fileExists(exe) || !fileIsExecutable(exe) {
|
||||
@ -80,3 +84,10 @@ func (v *Versioner) GetExecutableInDirectory(name, directory string) (string, er
|
||||
|
||||
return exe, nil
|
||||
}
|
||||
|
||||
func IsNewerIgnorePrerelease(a, b *semver.Version) bool {
|
||||
aN, _ := a.SetPrerelease("")
|
||||
bN, _ := b.SetPrerelease("")
|
||||
|
||||
return aN.GreaterThan(&bN)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user