阶段六:修复生命周期与运行状态一致性
This commit is contained in:
1 parent
5f8d999ab0
commit
c23a5a18b8
43 files changed
+1541
-171
No files matched your search
@@ -20,6 +20,8 @@ func main() {
|
||||
withDeps := flag.Bool("with-deps", false, "also install Linux system dependencies")
|
||||
// depsOnly 用于本次流程后续判断的depsOnly
|
||||
depsOnly := flag.Bool("deps-only", false, "only install Linux system dependencies; do not download Chromium")
|
||||
// driverOnly 表示只准备 Playwright driver,供服务初始化的可取消安装子进程使用。
|
||||
driverOnly := flag.Bool("driver-only", false, "only install the Playwright driver")
|
||||
flag.Parse()
|
||||
if *depsOnly && !*withDeps {
|
||||
*withDeps = true
|
||||
@@ -55,6 +57,9 @@ func main() {
|
||||
err := driver.DownloadDriver(); err != nil {
|
||||
fatal("下载 Playwright driver 失败", err)
|
||||
}
|
||||
if *driverOnly {
|
||||
return
|
||||
}
|
||||
|
||||
// args 用于本次流程后续判断的args
|
||||
args := []string{"install"}
|
||||
|
||||
Reference in new issue
Block a user