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

trident init updates .gitignore file by appending in the same line #186

Closed
hetdagli234 opened this issue Aug 11, 2024 · 4 comments
Closed

Comments

@hetdagli234
Copy link

On running trident init fuzz, the .gitignore file is updated by appending the trident-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.

hetdagli234 added a commit to hetdagli234/trident that referenced this issue Aug 11, 2024
@st22nestrel
Copy link

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? 🙂

@hetdagli234
Copy link
Author

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.

@st22nestrel
Copy link

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?

@hetdagli234
Copy link
Author

I am using MacOS Sonoma 14.5 and Cursor as my IDE which is VS code based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants