This is the mail archive of the
mailing list for the Cygwin project.
Re: Access windows environment variable via cygwin
- From: cyg Simple <cygsimple at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 12 May 2017 10:23:56 -0400
- Subject: Re: Access windows environment variable via cygwin
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
On 5/11/2017 9:14 PM, ChampS wrote:
> I want to use Cygwin to access all Windows applications installed on my
> Windows 7 system. The Problem is that Windows is using spaces in its
> environment variable 'Path' and Cygwin can not handle the spaces. Is
> there a way to use the Windows environment variable 'Path' even with
> spaces in it? For Example I want to start x86 sbt via Cygwin, then I
> will get the following error message: "/cygdrive/c/Program Files
> (x86)/sbt/bin/sbt: line 61: /sbt-launch-lib.bash: No such file or
> directory". But when I try it with the default Windows cmd it works.
> Thought about something like iterating over the 'Path' environment
> variable in bashrc and adapt the strings to fit for Cygwin. But I don't
> know how I can access the Windows environment variables and how I could
> provide the adapted environment variable to Cygwin.
> Someone an idea how I could solve this issue?
Besides all of the other help already suggested you can also use the 8.3
format of the directory name to remove the spaces from PATH in your
Windows environment variable. Then Cygwin will not see the spaces
either. The use of 8.3 format is configurable and you may need to turn
it on for the drive. Use the "dir /X" cmd.exe command to see if you
have the 8.3 name.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple