Skip to content

Commit

Permalink
Fix cleanAssetCatalog error (#41865)
Browse files Browse the repository at this point in the history
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 variable `files` which is confusing since its folders.

## Changelog:

[IOS] [FIXED] - Fix cleanAssetCatalog error

Pull Request resolved: #41865

Test Plan: Tested in an app that uses asset catalogs

Reviewed By: NickGerleman

Differential Revision: D52032258

Pulled By: huntie

fbshipit-source-id: 1dc0ca09e0da0d514b03d7d72707bdcaef03301d
  • Loading branch information
janicduplessis authored and facebook-github-bot committed Dec 12, 2023
1 parent 1c77919 commit d5114a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function cleanAssetCatalog(catalogDir: string): void {
.readdirSync(catalogDir)
.filter(file => file.endsWith('.imageset'));
for (const file of files) {
fs.rmSync(path.join(catalogDir, file));
fs.rmSync(path.join(catalogDir, file), {recursive: true, force: true});
}
}

Expand Down

0 comments on commit d5114a4

Please sign in to comment.