Skip to content

[skip changelog] Force windows env to use bash as shell instead of powershell #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 28, 2019

Conversation

rsora
Copy link
Contributor

@rsora rsora commented Oct 25, 2019

As per GitHub announcement the default shell for Windows steps is pwsh.

This causes the Install Go deps step fail on windows.

  Install Go deps13s
##[error]Process completed with exit code 1.
Run go get github.com/golangci/govet
  go get github.com/golangci/govet
  go get golang.org/x/lint/golint
  go get github.com/golang/protobuf/protoc-gen-go
  shell: C:\Program Files\PowerShell\6\pwsh.EXE -command ". '{0}'"
  env:
    GOROOT: C:\hostedtoolcache\windows\go\1.13.3\x64
go: finding github.com/golangci/govet latest
go: downloading github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190
go: extracting github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190
go: downloading golang.org/x/tools v0.0.0-20190328211700-ab21143f2384
go: extracting golang.org/x/tools v0.0.0-20190328211700-ab21143f2384
go: finding golang.org/x/tools v0.0.0-20190328211700-ab21143f2384
go: finding golang.org/x/lint latest
go: downloading golang.org/x/lint v0.0.0-20190930215403-16217165b5de
go: extracting golang.org/x/lint v0.0.0-20190930215403-16217165b5de
go: downloading golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3
go: extracting golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3
go: finding github.com/golang/protobuf v1.3.2
##[error]Process completed with exit code 1.

Switching to bash solves the issue as per github documentation

The default shell on non-Windows platforms with a fallback to sh. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used.

@rsora rsora changed the title [skip changelog] Force windows env to use cmd as shell instead of pow… [skip changelog] Force windows env to use cmd as shell instead of powershell Oct 25, 2019
@rsora rsora marked this pull request as ready for review October 25, 2019 10:51
@rsora rsora changed the title [skip changelog] Force windows env to use cmd as shell instead of powershell [skip changelog] Force windows env to use bash as shell instead of powershell Oct 28, 2019
Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, 🍰 for the comments

@rsora rsora merged commit 4671f1d into master Oct 28, 2019
@rsora rsora deleted the rsora/win-shell branch October 28, 2019 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants