Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console: Don't return error for non-existing files #83

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

cfergeau
Copy link
Contributor

@cfergeau cfergeau commented Oct 21, 2022

When using NewFileSerialPortAttachment(), the virtualization framework will
create the log file if it does not exist yet.
commit 117c12a added a file existence check to this API, which is incorrect.

Fixes #84

@cfergeau cfergeau force-pushed the console branch 2 times, most recently from 92d0972 to b7b9303 Compare October 21, 2022 09:31
@cfergeau
Copy link
Contributor Author

The failure on the macOS11 builders is not strictly related to this PR

            issues_test.go:112: want underlying error "file does not exist" but got "unsupported macOS version"

@cfergeau
Copy link
Contributor Author

Probably not the best fix, but good enough to get the tests to pass ;)

console.go Outdated Show resolved Hide resolved
@Code-Hex
Copy link
Owner

Code-Hex commented Oct 24, 2022

@cfergeau Create the issue first, as described in the contribution guide.
I will not review anything that does not comply with the rules. (I close your PR)

Ensure the PR description clearly describes the problem and solution. Must be included the relevant issue number.

https://github.com/Code-Hex/vz/blob/master/CONTRIBUTING.md

NewFileSerialPortAttachment was mistakenly used in the 'NewSharedDirectory'
test
When using NewFileSerialPortAttachment(), the virtualization framework will
create the log file if it does not exist yet. If a directory in the path
is invalid, an error will be returned by the virtualization framework,
not an exception.This means we don't need to check this in Code-Hex/vz.

This commit removes the file existence check which was added in commit
117c12a.

This fixes Code-Hex#84
@cfergeau
Copy link
Contributor Author

@cfergeau Create the issue first, as described in the contribution guide. I will not review anything that does not comply with the rules. (I close your PR)

Ensure the PR description clearly describes the problem and solution. Must be included the relevant issue number.

https://github.com/Code-Hex/vz/blob/master/CONTRIBUTING.md

This was missing from some of your recent commits. I assumed this was no longer a strict requirement.

Copy link
Owner

@Code-Hex Code-Hex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Code-Hex Code-Hex merged commit d856144 into Code-Hex:master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: NewFileSerialPortAttachment() no longer create log files
2 participants