Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

sail command retrieve wrong version of code-server #260

@oqu

Description

@oqu

sail command fetch latest release from github and get something like:
Found https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-alpine-arm64.tar.gz
Found https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-alpine-x86_64.tar.gz
Found https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-darwin-x86_64.zip
Found https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-linux-arm64.tar.gz
Found https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz

Current implementation filter release by 'linux' :

for _, v := range rel.Assets {
		// TODO: fix this jank.
		if strings.Index(*v.Name, "linux") < 0 {
			continue
		}
		return *v.BrowserDownloadURL, nil
	}

https://github.com/cdr/sail/blob/master/internal/codeserver/download.go
Unfortunately, the first line to match is linux-arm64 so code-server cannot be executed.

sail should figure out what architecture it is running on and download the right asset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions