-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Description
When i am running the following code in windows 10. I am facing the leakless issue.
Issue Details Here
panic: fork/exec C:\Users\{user}\AppData\Local\Temp\leakless-0c3354cd58f0813bb5b34ddf3a7c16ed\leakless.exe: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
package main
import (
"os/exec"
"github.com/go-rod/rod"
"github.com/go-rod/rod/lib/launcher"
"github.com/go-rod/rod/lib/utils"
"github.com/ysmood/leakless"
)
func main() {
path := launcher.NewBrowser().MustGet()
// use the FormatArgs to construct args, this line is optional, you can construct the args manually
args := launcher.New().FormatArgs()
var cmd *exec.Cmd
if true { // decide whether to use leakless or not
cmd = leakless.New().Command(path, args...)
} else {
cmd = exec.Command(path, args...)
}
parser := launcher.NewURLParser()
cmd.Stderr = parser
utils.E(cmd.Start())
u := launcher.MustResolveURL(<-parser.URL)
page := rod.New().ControlURL(u).MustConnect().MustPage("https://www.tsa.gov/coronavirus/passenger-throughput")
defer page.MustClose()
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels