-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Fix cleanAssetCatalog error #41865
Fix cleanAssetCatalog error #41865
Conversation
@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
.filter(file => file.endsWith('.imageset')); | ||
for (const file of files) { | ||
fs.rmSync(path.join(catalogDir, file)); | ||
.filter(imageSet => imageSet.endsWith('.imageset')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It's inaccurate to rename this to imageSet
within this filter call, given these are candidates within the search directory. Let's use file
or fileOrDir
(which in this case is technically a file, directory, or package).
(I also don't mind the previous generic naming of files
for the outer variable — until there is a future need to remove multiple kinds of files differently.)
@huntie Makes sense, lets just keep the current naming. |
@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: There is currently an error when building in release on iOS when using asset catalogs (experimental feature that is partially merged facebook#30129) This was probably incorrectly migrated from the community cli repo. `.imageset` is actually folders so it needs to be removed with `{recursive: true, force: true}`. I also renamed the variable `files` which is confusing since its folders. ## Changelog: [IOS] [FIXED] - Fix cleanAssetCatalog error Pull Request resolved: facebook#41865 Test Plan: Tested in an app that uses asset catalogs Reviewed By: NickGerleman Differential Revision: D52032258 Pulled By: huntie fbshipit-source-id: 1dc0ca09e0da0d514b03d7d72707bdcaef03301d
Summary:
There is currently an error when building in release on iOS when using asset catalogs (experimental feature that is partially merged #30129)
This was probably incorrectly migrated from the community cli repo.
.imageset
is actually folders so it needs to be removed with{recursive: true, force: true}
. I also renamed the variablefiles
which is confusing since its folders.Changelog:
[IOS] [FIXED] - Fix cleanAssetCatalog error
Test Plan:
Tested in an app that uses asset catalogs