Skip to content
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

init command duplicates node_modules gitignore entry #3490

Closed
3 tasks done
namoscato opened this issue Dec 30, 2022 · 3 comments
Closed
3 tasks done

init command duplicates node_modules gitignore entry #3490

namoscato opened this issue Dec 30, 2022 · 3 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@namoscato
Copy link

Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!

checkGitignoreForNodeModules is not properly accounting for scenarios in which the node_modules gitignore entry is prefixed and/or suffixed with a forward slash.

Reproduction

https://github.com/namoscato/todaypgh

Steps to reproduce

  1. given an existing repository with .gitignore, i.e.

    /node_modules/
    
  2. run npx @tinacms/cli@latest init

  3. see that node_modules entry is incorrectly added

System Info

System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 159.88 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - ~/dev/git/todaypgh/node_modules/.bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 108.0.5359.124
    Chrome Canary: 111.0.5508.0
    Firefox: 104.0.2
    Safari: 16.2
  npmPackages:
    @tinacms/cli: ^1.0.5 => 1.0.5 
    tinacms: ^1.1.2 => 1.1.2

Validations

@namoscato namoscato added the bug Something isn't working label Dec 30, 2022
@jamespohalloran
Copy link
Contributor

To confirm I understand, is the issue that it adds a redundant node_modules, when you already have a /node_modules or /node_modules/ in your .gitignore?

@namoscato
Copy link
Author

Yeah, correct. Relatively minor issue but figured I would make a note.

@stale
Copy link

stale bot commented May 3, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label May 3, 2023
@stale stale bot closed this as completed May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants