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

.gitignore not working on folder #172

Closed
letmaik opened this issue Jun 24, 2015 · 7 comments

Comments

@letmaik
Copy link

commented Jun 24, 2015

I have src/jspm_packages/ in my .gitignore but standard scans it anyway. The same also happens when I put "ignore": ["src/jspm_packages/"] in package.json under "standard". Only when I use "ignore": ["src/jspm_packages/**"] it works. I'd like to use .gitignore however. Am I doing something wrong here? I'm on Windows if that matters.

@feross

This comment has been minimized.

Copy link
Member

commented Jun 24, 2015

This is supposed to work.

What version of standard are you using? Please ensure you are using the latest version. This issue was supposedly fixed in 4.1.1, as you can see in the discussion here: #125 (comment)

Please run: npm install standard@latest --save-dev to ensure you have the latest version.

@letmaik

This comment has been minimized.

Copy link
Author

commented Jun 25, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Jun 25, 2015

Are you sure you're not running a globally installed version that's out of date? You can update that with npm install standard -g.

I'm not sure what the issue may be, but if you figure something out, PR welcome!

@feross

This comment has been minimized.

Copy link
Member

commented Jun 28, 2015

@neothemachine Do you have any updates?

@letmaik

This comment has been minimized.

Copy link
Author

commented Jun 28, 2015

Sorry for the delay. I just did some more tests (with 4.4.0 installed globally):

The following patterns are handled correctly in standard in .gitignore on my system (Windows):

  • build.js
  • src\build.js
  • src\\build.js
  • src\\\build.js (for whatever reason; this was just a test)
  • src\jspm_packages\*
  • src\\jspm_packages\\*

Those don't work:

  • src/build.js
  • src/jspm_packages/
  • src/jspm_packages/*
  • src\jspm_packages\
  • src\\jspm_packages\\

@feross feross closed this in be5e1e8 Jun 29, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Jun 29, 2015

It looks like a regression was introduced in @mafintosh's bugfix PR from last week: #168

The ignore package which we use to handle .gitignore patterns does not handle windows style paths, so we have to convert windows paths to unix style before calling it. It turns out that the node.js path functions (path.resolve, path.join) always convert path separators to the system's style (\ on windows, / on unix). So when the path functions were introduced before the call to ignore, we started passing windows style paths to that module!

I should have noticed this before merging. My bad!

Fixed in 4.4.1.

@neothemachine Thanks for the list of patterns – it was very helpful.

@feross feross added bug and removed need more info labels Jun 29, 2015

@letmaik

This comment has been minimized.

Copy link
Author

commented Jun 29, 2015

Just tested it and it works. Thanks for fixing! :)

letmaik added a commit to Reading-eScience-Centre/edal-json that referenced this issue Jun 29, 2015

Flet added a commit to Flet/standard that referenced this issue Oct 23, 2015

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.