Skip to content

Commit

Permalink
Merge pull request #83 from cfergeau/console
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Hex authored Oct 24, 2022
2 parents 1ed2037 + 0842149 commit d856144
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 0 additions & 3 deletions console.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ func NewFileSerialPortAttachment(path string, shouldAppend bool) (*FileSerialPor
if macosMajorVersionLessThan(11) {
return nil, ErrUnsupportedOSVersion
}
if _, err := os.Stat(path); err != nil {
return nil, err
}

cpath := charWithGoString(path)
defer cpath.Free()
Expand Down
9 changes: 2 additions & 7 deletions issues_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,8 @@ func TestIssue43(t *testing.T) {
})

cases := map[string]func() error{
// This is also fixed issue #71
"NewFileSerialPortAttachment": func() error {
_, err := NewFileSerialPortAttachment(doesNotExists, false)
return err
},
"NewSharedDirectory": func() error {
_, err := NewFileSerialPortAttachment(doesNotExists, false)
_, err := NewSharedDirectory(doesNotExists, false)
return err
},
"NewDiskImageStorageDeviceAttachment": func() error {
Expand All @@ -113,7 +108,7 @@ func TestIssue43(t *testing.T) {
if err == nil {
t.Fatal("expected returns error")
}
if !errors.Is(err, os.ErrNotExist) {
if !errors.Is(err, ErrUnsupportedOSVersion) && !errors.Is(err, os.ErrNotExist) {
t.Errorf("want underlying error %q but got %q", os.ErrNotExist, err)
}
})
Expand Down

0 comments on commit d856144

Please sign in to comment.