Skip to content

Tests: use FileManager.default.createFile(atPath:contents:) #5478

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

Merged
merged 1 commit into from
May 17, 2022

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented May 8, 2022

Rather than using touch which is not a universal command, use the
FileManager APIs to create the file.

@compnerd
Copy link
Member Author

compnerd commented May 8, 2022

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented May 9, 2022

try fileSystem.writeFileContents(path, bytes: "")

see #4872 (comment)

@compnerd
Copy link
Member Author

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented May 16, 2022

I think it is missing a try

@compnerd
Copy link
Member Author

So I learnt locally as well. I'll be uploading a new version with the fix for that soon.

Rather than using `touch` which is not a universal command, use the
`LocalFileSystem` APIs to create the file.
@compnerd
Copy link
Member Author

@swift-ci please smoke test

@tomerd tomerd merged commit 91746c0 into swiftlang:main May 17, 2022
@compnerd compnerd deleted the createFile branch May 17, 2022 03:41
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.

2 participants