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

Move removeFile into go routine #46

Open
wants to merge 3 commits into
base: master
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
2 changes: 1 addition & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (b *Builder) Build(p *Params) {
color.Cyan("Building %s...\n", pkg)

// build package
cmd, err := runCommand("go", "build", "-i", "-o", fileName, pkg)
cmd, err := runCommand("go", "build", "-o", fileName, pkg)
if err != nil {
log.Fatalf("Could not run 'go build' command: %s", err)
continue
Expand Down
4 changes: 2 additions & 2 deletions common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ func TestParamsGet(t *testing.T) {

run := params.Get("run")
if run != "statler" {
t.Error("Expected statler but got %s in params.Get()", run)
t.Errorf("Expected statler but got %s in params.Get()", run)
t.FailNow()
}
}
Expand All @@ -20,7 +20,7 @@ func TestParamsClone(t *testing.T) {
params.cloneRunFlag()
watch := params.Get("watch")
if watch != "statler" {
t.Error("Expected statler but got %s when watch param is not set", watch)
t.Errorf("Expected statler but got %s when watch param is not set", watch)
}

params.Watcher["watch"] = "waldorf"
Expand Down
7 changes: 4 additions & 3 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ func (r *Runner) Run(p *Params) {
}

r.cmd = cmd
removeFile(fileName)

go func(cmd *exec.Cmd) {
go func(cmd *exec.Cmd, fileName string) {
if err := cmd.Wait(); err != nil {
log.Printf("process interrupted: %s \n", err)
r.kill(cmd)
}
}(r.cmd)

removeFile(fileName)
}(r.cmd, fileName)
}
}

Expand Down
27 changes: 0 additions & 27 deletions vendor/golang.org/x/sys/unix/LICENSE

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/golang.org/x/sys/unix/asm.s

This file was deleted.

10 changes: 5 additions & 5 deletions vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 33 additions & 3 deletions vendor/golang.org/x/sys/unix/asm_linux_386.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion vendor/golang.org/x/sys/unix/asm_linux_amd64.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 31 additions & 4 deletions vendor/golang.org/x/sys/unix/asm_linux_arm.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion vendor/golang.org/x/sys/unix/asm_linux_arm64.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 32 additions & 4 deletions vendor/golang.org/x/sys/unix/asm_linux_mips64x.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 27 additions & 11 deletions vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading