mirror of
https://github.com/go-delve/delve.git
synced 2025-10-31 02:36:18 +08:00
service/dap: avoid double removal of temp built binary (#2335)
* Avoid double removal of temp binary * Add back accidentally removed empty line * Simplify regex * Use unique build output directories in test cases * Recover TestLaunchDebugRequest hidden logging and refine error check * Special case access-denied error on Windows * Remove special case for access denied on Windows * Increase remove delay on Win Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
This commit is contained in:
@ -20,7 +20,7 @@ func Remove(path string) {
|
||||
// Open files can be removed on Unix, but not on Windows, where there also appears
|
||||
// to be a delay in releasing the binary when the process exits. So we try again.
|
||||
if err != nil && runtime.GOOS == "windows" {
|
||||
time.Sleep(10 * time.Microsecond)
|
||||
time.Sleep(100 * time.Microsecond)
|
||||
err = os.Remove(path)
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user