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

added path seperator as a cli var for cases where path.sep is undefined #53

Closed
wants to merge 1 commit into from
Closed

Conversation

yamanote1138
Copy link

Added 'pathsep' as a CLI var (or .groc.json config var), figured it might be worth sharing. If the pathsep var is not provided and path.sep is undefined, path.sep is set to '/'.

I'm not terribly familiar with coffeescript, so please double-check me if you can :)

I had to make this change as we're running node v0.6.20, so path.sep was undefined. I couldn't get groc to generate relative paths no matter what i tried config-wise. A little bit of console logging exposed a whole bunch of 'undefined' getting injected into stripPaths because of the reliance on path.sep (which isn't introduced until node v0.8, I think).

@Prestaul
Copy link

+1 Yes, please. We're stuck on a corporate installation of v0.6 for now. Until we can get up to v0.8 we can't use groc without this fix.

@nevir
Copy link
Owner

nevir commented Oct 2, 2012

Hmm, I'm not a fan of making this configurable; going to see about just detecting windows on 0.6 and below

@yamanote1138
Copy link
Author

works for me :)

@yamanote1138
Copy link
Author

for what it's worth, we ended up just adding path.sep='/'; to the wrapper script we use to kick off groc
just figured i'd put this out there to save anyone that's stuck on a early version of node like we are :P

@nevir
Copy link
Owner

nevir commented Oct 14, 2012

Alright, groc 0.2.17 is in and it's got some simplistic path.sep detection; shouldn't need your hacks any more :)

@nevir nevir closed this Oct 14, 2012
@nevir nevir mentioned this pull request Oct 14, 2012
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

Successfully merging this pull request may close these issues.

3 participants