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

bash export errors #42

Closed
rettal opened this issue Jan 3, 2014 · 6 comments
Closed

bash export errors #42

rettal opened this issue Jan 3, 2014 · 6 comments

Comments

@rettal
Copy link

rettal commented Jan 3, 2014

Hi,

Windows 7 Host Machine with Ubuntu 12.04 Precise32 Host

If you have multiple values in your no_proxy environment variable it does not get surrounded in quotes (in /etc/profile.d/proxy.sh) so when logging in to VM you get numerous bash export errors as it tries to export each value one as a variable.

The error is similar to this:
bash: export: `xxxxxxx': not a valid identifier

@tmatilai
Copy link
Owner

tmatilai commented Jan 3, 2014

Hi @rettal,

as far as I know, you need to separate multiple values with commas. If you don't add spaces, bash should not get angry.

@rettal
Copy link
Author

rettal commented Jan 4, 2014

Hi,
Yes but my no_proxy environment variable is passed from windows to vm to create proxy.sh, and the format it is in works for windows, another aspect is wildcards, these must be surrounded in quotes as they have special meaning in bash?
Every time I do a vagrant up I need to go in and fix proxy.sh. Is it vagrant or this plugin that creates proxy.sh?
Thanks.

@tmatilai
Copy link
Owner

tmatilai commented Jan 4, 2014

@rettal yeah, this plugin creates that file. And you're right, it doesn't handle escaping or quoting. The original idea was that you could pass logic like building https_proxy from $http_proxy. Seems I didn't think it totally through. But I was thinking to deprecate that anyway for #38.

Anyway, the * glob should probably work fine with default setup as it most probably won't match any files. And I'm not sure Windows and unix tools always work with same formats. You should be able to pass the quotes to it yourself though. Something like config.env_proxy.no_proxy = "'*.foo'"

I'll think about this and fix it for the next release. But earliest on next week as I'm still on vacation. =)

@rettal
Copy link
Author

rettal commented Jan 6, 2014

OK thanks a lot, enjoy what's left of your vacation and thanks for taking time to reply :)

@tmatilai
Copy link
Owner

@rettal no_proxy quoting should now be fixed in git, and will be released in v1.1.0 at some point.

@rettal
Copy link
Author

rettal commented Jan 17, 2014

OK thanks for letting me know. And thanks for a great plugin! ;)

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

2 participants