angular-git-info icon indicating copy to clipboard operation
angular-git-info copied to clipboard

multiple and wrong gitignore entry

Open eturella opened this issue 4 years ago • 1 comments

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

eturella avatar Feb 25 '21 14:02 eturella

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.

kaihenzler avatar Feb 26 '21 07:02 kaihenzler