fix: 优化代码细节

This commit is contained in:
余泓铮
2024-08-16 10:50:14 +08:00
parent 803c4c0740
commit 29566e9049

View File

@@ -334,11 +334,11 @@ func (dev *AndroidDevice) Uninstall(packageName string) error {
func (dev *AndroidDevice) Install(appPath string, opts *InstallOptions) error {
app, err := os.Open(appPath)
defer app.Close()
if err != nil {
return errors.Wrap(err, fmt.Sprintf("install %s open file failed", appPath))
}
defer app.Close()
brand, err := dev.d.Brand()
if err != nil {
return err