Skip to content

Commit 8bac6d1

Browse files
authored
Merge pull request #68 from stuartleeks/sl/vscode-path
Update vscode-server search path
2 parents 08c9920 + 948efca commit 8bac6d1

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
#-------------------------------------------------------------------------------------------------------------
55

6-
FROM golang:1.15-stretch
6+
FROM golang:1.17-stretch
77

88
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive
@@ -49,7 +49,6 @@ ENV GO111MODULE=on
4949
# Install Go tools
5050
ARG GO_PLS_VERSION=0.7.2
5151
ARG DLV_VERSION=1.7.2
52-
ARG GO_RELEASER_VERSION=0.180.3
5352
ARG GOLANGCI_LINT_VERSION=1.42.1
5453
RUN \
5554
# --> Delve for debugging
@@ -61,7 +60,9 @@ RUN \
6160
# --> GolangCI-lint
6261
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v${GOLANGCI_LINT_VERSION} \
6362
# --> Go releaser
64-
&& curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh -s -- v${GO_RELEASER_VERSION} \
63+
&& echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list \
64+
&& sudo apt update \
65+
&& sudo apt install goreleaser -y \
6566
# --> Install junit converter
6667
&& go get github.com/jstemmer/[email protected] \
6768
&& sudo rm -rf /go/src/ \

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
1+
-y// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/go
33
{
44
"name": "devcontainer-cli",

.github/workflows/build-and-release.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ jobs:
2929
username: ${{ github.repository_owner }}
3030
password: ${{ secrets.GITHUB_TOKEN }}
3131

32+
- name: Create dummy mount folders
33+
run: |
34+
mkdir -p ~/.config/gh
35+
mkdir -p ~/.azure
36+
3237
- name: Build and run CLI
33-
uses: stuartleeks/devcontainer-build-run@v0.1
38+
uses: devcontainers/ci@v0.2
3439
env:
3540
GITHUB_TOKEN: ${{ secrets.GH_CROSS_REPO_TOKEN }}
3641
BUILD_NUMBER: ${{ github.run_id }}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ require (
66
github.com/blang/semver v3.5.1+incompatible
77
github.com/bradford-hamilton/dora v0.1.1
88
github.com/kyoh86/richgo v0.3.10 // indirect
9-
github.com/mattn/go-isatty v0.0.14 // indirect
9+
github.com/mattn/go-isatty v0.0.16 // indirect
1010
github.com/rhysd/go-github-selfupdate v1.2.2
1111
github.com/spf13/cobra v1.0.0
1212
github.com/spf13/viper v1.4.0
1313
github.com/stretchr/testify v1.7.0
14-
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d // indirect
14+
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 // indirect
1515
gopkg.in/yaml.v2 v2.4.0 // indirect
1616
)
1717

go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1y
8181
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
8282
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
8383
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
84+
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
85+
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
8486
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
8587
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
8688
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
@@ -193,6 +195,9 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8
193195
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
194196
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d h1:Zu/JngovGLVi6t2J3nmAf3AoTDwuzw85YZ3b9o4yU7s=
195197
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
198+
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
199+
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 h1:nwzwVf0l2Y/lkov/+IYgMMbFyI+QypZDds9RxlSmsFQ=
200+
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
196201
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
197202
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
198203
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

internal/pkg/devcontainers/dockerutils.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ func getSshAuthSockValue(containerID string) (string, error) {
359359
}
360360

361361
func getVscodeServerPath(containerID string) (string, error) {
362-
path, err := getLatestFileMatch(containerID, "/vscode/vscode-server/bin/linux-x64/*")
362+
path, err := getLatestFileMatch(containerID, "${HOME}/.vscode-server/bin/*")
363+
if err == nil {
364+
return path, err
365+
}
366+
path, err = getLatestFileMatch(containerID, "/vscode/vscode-server/bin/linux-x64/*")
363367
if err == nil {
364368
return path, err
365369
}

0 commit comments

Comments
 (0)