Skip to content

Commit 3afb00a

Browse files
committed
chore: tweak valid platform file count
1 parent 714f805 commit 3afb00a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/controllers/platform-controller.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ export class PlatformController implements IPlatformController {
162162
path.join(projectData.platformsDir, platformName)
163163
).length;
164164

165-
// 3 is a magic number to approximate a valid platform folder
166-
// any valid platform should contain at least 3 files
167-
// we choose 3 to avoid false-positives due to system files like .DS_Store etc.
168-
if (platformDirectoryItemCount <= 3) {
165+
// 2 is a magic number to approximate a valid platform folder
166+
// any valid platform should contain at least 2 files/folders
167+
// we choose 2 to avoid false-positives due to system files like .DS_Store etc.
168+
if (platformDirectoryItemCount <= 2) {
169169
this.$logger.warn(
170170
`The platforms/${platformName} folder appears to be invalid. If the build fails, run 'ns clean' and rebuild the app.`,
171171
{ wrapMessageWithBorders: true }

0 commit comments

Comments
 (0)