angular-git-info
angular-git-info copied to clipboard
multiple and wrong gitignore entry
thanks for your work!
1
multiple call to "ng add" results in same number of gitignore entries const buffer = host.read('.gitignore'); const content = buffer.toString(); if( !buffer.toString().includes('environments/version.ts'){ // call addEntry }
2
and file isn't really ignore sol1) environments/version.ts --> */environments/version.ts sol2) create a .gitignore in the same path of version.js
I see why the gitignore doesn't seem to work in some cases but you shouldn't be able to to run ng add multiple times.
If I run it again after it's already been added to the project I get the following error:
$ ng add @w11k/git-info
Skipping installation: Package already installed
ERROR! git-version.js already exists.
The Schematic workflow failed. See above.