Skip to content

Commit

Permalink
Fix cleanAssetCatalog error (facebook#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 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
  • Loading branch information
janicduplessis authored and Othinn committed Jan 9, 2024
1 parent 04332ac commit 9a28a1f
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 9a28a1f

Please sign in to comment.