Skip to content

CNA: add .github to allow list when checking if directory is empty #79550

@chrisweb

Description

@chrisweb

Link to the code that reproduces this issue

https://github.com/chrisweb/reproduction_create-next-app_empty_directory

To Reproduce

when using CNA and there is a .github directory already present then CNA exists

Current vs. Expected behavior

have CNA ignore the .github directory because it is on the allow list of the "check if is empty" function

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
  Available memory (MB): 32681
  Available CPU cores: 16
Binaries:
  Node: 22.13.0
  npm: 11.4.0
  Yarn: N/A
  pnpm: 9.15.3
Relevant Packages:
  next: 15.3.2 // Latest available version is detected (15.3.2).
  eslint-config-next: 15.3.2
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

create-next-app

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

use case: after creating a new directory, you add a prompt template for github copilot into your .github/prompts directory, this prompt instructs github copilot to install next.js using a CNA command

Metadata

Metadata

Assignees

No one assigned

    Labels

    create-next-appRelated to our CLI tool for quickly starting a new Next.js application.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions