Closed hetdagli234 closed 2 weeks ago
I would like to know how exactly is this an issue? As I do not know how to reproduce your problem, could you please describe exact steps how to reproduce it, so I can look into it? :slightly_smiling_face:
On running trident init
on an anchor program .gitignore file is updated like this:
*wallet.jsontrident-tests/fuzz_tests/fuzzing/hfuzz_target
ideally the folders trident wants to ignore should be added in a new line but it appends in the same line. As you can see above *wallet.json
is no longer ignored for me now, nor are the trident-tests.
Ok, now I get your problem, your .gitignore
file does not end with newline, and that is why the current version of trident produces malformed .gitignore
. I could not reproduce your problem right away because after running anchor init <project-name>
, my .gitignore
has the needed newline. I am using anchor-0.30.1
on Ubuntu 24.04 LTS
.
Maybe your version of anchor does not append newline at the end of .gitignore
which is probably not the case and it is likely more related to your OS or IDE setting. Nevertheless, trident should update .gitignore
without need for manual adjustments.
Just for curiosity, what OS and IDE are you using?
I am using MacOS Sonoma 14.5 and Cursor as my IDE which is VS code based.
On running
trident init fuzz
, the .gitignore file is updated by appending thetrident-tests/fuzz_tests/fuzzing/hfuzz_target
in the same line.It should ideally be added in the new line. This caused an issue as now git does not ignore the previous and new trident line.