Skip to content
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

Fix windows tests (branch beta-v2) #217

Open
wants to merge 2 commits into
base: beta-v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ fmt: ## Format your code with gofmt
$(GOFMT) -w .

yamlfmt: ## Format your code with yamlfmt
ifeq (, $(shell which yamlfmt))
ifeq (, $(shell which yamlfmt 2>/dev/null ))
go install github.com/google/yamlfmt/cmd/yamlfmt@v0.9.0
endif
yamlfmt .

addlicense: ## Add licence header to all files
ifeq (, $(shell which addlicense))
ifeq (, $(shell which addlicense 2>/dev/null ))
go install github.com/google/addlicense@latest
endif
addlicense -f LICENSE-HEADER .
Expand Down Expand Up @@ -89,21 +89,21 @@ ifneq (, $(shell $(GOFMT) -l . ))
@echo "Please run '$(CYAN)make fmt$(RESET)' to format your code"
@exit 1
endif
ifeq (, $(shell which staticcheck))
ifeq (, $(shell which staticcheck 2>/dev/null ))
go install honnef.co/go/tools/cmd/staticcheck@latest
endif
staticcheck ./...

lint-yaml: ## Check the yaml is valid and correctly formatted
ifeq (, $(shell which yamlfmt))
ifeq (, $(shell which yamlfmt 2>/dev/null ))
go install github.com/google/yamlfmt/cmd/yamlfmt@v0.9.0
endif
@echo "yamlfmt --quiet --lint ."
@yamlfmt --quiet --lint . \
|| ( echo "Please run '$(CYAN)make yamlfmt$(RESET)' to fix it (if a format error)" && exit 1 )

lint-license-header: ## Check if all files have the license header
ifeq (, $(shell which addlicense))
ifeq (, $(shell which addlicense 2>/dev/null ))
go install github.com/google/addlicense@latest
endif
@echo "addlicense -check -f LICENSE-HEADER -ignore coverage/** ."
Expand Down Expand Up @@ -140,7 +140,7 @@ env: ## Print useful environment variables to stdout
@echo '$$(FILES#) :' $(shell echo $(FILES) | wc -w)

setup: ## Setup some dev dependencies (eg: pre-commit)
ifeq (, $(shell which pre-commit))
ifeq (, $(shell which pre-commit 2>/dev/null ))
@echo "pre-commit is not installed. Check $(CYAN)https://pre-commit.com/#install$(RESET)"
endif
pre-commit install --install-hooks
4 changes: 3 additions & 1 deletion internal/exec/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ func TestOsExec(t *testing.T) {

func init() {
if runtime.GOOS == "windows" {
endLine = "\r\n"
// windows ends echo with \n or \r\n ?!?
endLine = "\n"
// endLine = "\r\n"
}
}
Loading