|
|
@ -33,7 +33,6 @@ package fs
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"os/exec"
|
|
|
|
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"runtime"
|
|
|
|
"runtime"
|
|
|
|
"testing"
|
|
|
|
"testing"
|
|
|
@ -355,19 +354,6 @@ func TestCopyFile(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func cleanUpDir(dir string) {
|
|
|
|
|
|
|
|
// NOTE(mattn): It seems that sometimes git.exe is not dead
|
|
|
|
|
|
|
|
// when cleanUpDir() is called. But we do not know any way to wait for it.
|
|
|
|
|
|
|
|
if runtime.GOOS == "windows" {
|
|
|
|
|
|
|
|
mu.Lock()
|
|
|
|
|
|
|
|
exec.Command(`taskkill`, `/F`, `/IM`, `git.exe`).Run()
|
|
|
|
|
|
|
|
mu.Unlock()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if dir != "" {
|
|
|
|
|
|
|
|
os.RemoveAll(dir)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func TestCopyFileSymlink(t *testing.T) {
|
|
|
|
func TestCopyFileSymlink(t *testing.T) {
|
|
|
|
tempdir := t.TempDir()
|
|
|
|
tempdir := t.TempDir()
|
|
|
|
|
|
|
|
|
|
|
|