mirror of
https://github.com/appleboy/drone-ssh.git
synced 2026-02-17 09:48:50 +08:00
12
vendor/github.com/appleboy/easyssh-proxy/Makefile
generated
vendored
12
vendor/github.com/appleboy/easyssh-proxy/Makefile
generated
vendored
@@ -1,8 +1,7 @@
|
||||
.PHONY: test drone-ssh fmt vet errcheck lint install update coverage embedmd
|
||||
|
||||
GOFMT ?= gofmt "-s"
|
||||
|
||||
GOFILES := find . -name "*.go" -type f -not -path "./vendor/*"
|
||||
GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*")
|
||||
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
|
||||
|
||||
all: install lint
|
||||
@@ -14,16 +13,17 @@ install:
|
||||
govendor sync
|
||||
|
||||
fmt:
|
||||
$(GOFILES) | xargs $(GOFMT) -w
|
||||
$(GOFMT) -w $(GOFILES)
|
||||
|
||||
.PHONY: fmt-check
|
||||
fmt-check:
|
||||
# get all go files and run go fmt on them
|
||||
@files=$$($(GOFILES) | xargs $(GOFMT) -l); if [ -n "$$files" ]; then \
|
||||
@diff=$$($(GOFMT) -d $(GOFILES)); \
|
||||
if [ -n "$$diff" ]; then \
|
||||
echo "Please run 'make fmt' and commit the result:"; \
|
||||
echo "$${files}"; \
|
||||
echo "$${diff}"; \
|
||||
exit 1; \
|
||||
fi;
|
||||
fi;
|
||||
|
||||
vet:
|
||||
go vet $(PACKAGES)
|
||||
|
||||
3
vendor/github.com/appleboy/easyssh-proxy/easyssh.go
generated
vendored
3
vendor/github.com/appleboy/easyssh-proxy/easyssh.go
generated
vendored
@@ -210,12 +210,9 @@ func (ssh_conf *MakeConfig) Stream(command string, timeout int) (stdout chan str
|
||||
|
||||
select {
|
||||
case <-res:
|
||||
stdoutChan <- ""
|
||||
stderrChan <- ""
|
||||
errChan <- session.Wait()
|
||||
done <- true
|
||||
case <-timeoutChan:
|
||||
stdoutChan <- ""
|
||||
stderrChan <- "Run Command Timeout!"
|
||||
errChan <- nil
|
||||
done <- false
|
||||
|
||||
Reference in New Issue
Block a user