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

pixi init . does not modify the .gitignore if it is already present #487

Closed
2 tasks done
traversaro opened this issue Nov 22, 2023 · 3 comments · Fixed by #490
Closed
2 tasks done

pixi init . does not modify the .gitignore if it is already present #487

traversaro opened this issue Nov 22, 2023 · 3 comments · Fixed by #490
Labels
🐞 bug Something isn't working

Comments

@traversaro
Copy link
Contributor

traversaro commented Nov 22, 2023

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

I tested this on Ubuntu 22.04 on WSL2 with pixi 0.7.0 :

traversaro@IITICUBLAP257:~$ mkdir testdir
traversaro@IITICUBLAP257:~$ cd testdir/
traversaro@IITICUBLAP257:~/testdir$ touch .gitignore
traversaro@IITICUBLAP257:~/testdir$ pixi init .
✔ Initialized project in /home/traversaro/testdir/.
traversaro@IITICUBLAP257:~/testdir$ cat .gitignore

Issue description

From #343 (comment), I tought that pixi init . should append a line related to .pixi directory even if the .gitignore is already present. However, this does not seem the case.

Smaller note, the comment in

// create a .gitignore if one is missing
seems outdated.

Expected behavior

traversaro@IITICUBLAP257:~$ mkdir testdir
traversaro@IITICUBLAP257:~$ cd testdir/
traversaro@IITICUBLAP257:~/testdir$ touch .gitignore
traversaro@IITICUBLAP257:~/testdir$ pixi init .
✔ Initialized project in /home/traversaro/testdir/.
traversaro@IITICUBLAP257:~/testdir$ cat .gitignore
# pixi environments
.pixi
@traversaro traversaro added the 🐞 bug Something isn't working label Nov 22, 2023
@ruben-arts
Copy link
Contributor

That was indeed the whole reason for that function... Let me take a look.

@traversaro
Copy link
Contributor Author

Thanks @ruben-arts !

@ruben-arts
Copy link
Contributor

Thank you for reporting! @traversaro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants