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

IDEX-4232: Support windows directories with spaces #241

Merged
2 commits merged into from
Jan 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assembly-main/src/assembly/bin/che.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ REM Check to ensure bash is installed
CALL bash --help > nul 2>&1
IF %ERRORLEVEL% NEQ 0 goto setup

REM IDEX-4232 change windows long directories to DOS 8.3 format to handle directories with spaces
FOR %%i in ("%~dp0..") do set "CHE_WINDOWS_SHORT_DIR=%%~Si"

REM Launch Che and any associated docker machines, if necessary
CALL bash --login -i "%~dp0\che.sh" %*

Expand Down
9 changes: 5 additions & 4 deletions assembly-main/src/assembly/bin/che.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,11 @@ function set_environment_variables {
### Use values set by user, unless they are broken, then fix them
# The base directory of Che
if [ -z "${CHE_HOME}" ]; then
export CHE_HOME="$(dirname "$(cd "$(dirname "${0}")" && pwd -P)")"
#export CHE_HOME="/c/PROGRA~1/eclipse-che-4.0.0-RC1-SNAPSHOT"
#export CHE_HOME=/c/Program\ Files/eclipse-che-4.0.0-RC1-SNAPSHOT
echo $CHE_HOME
if [ "${WIN}" == "true" ]; then
export CHE_HOME="${CHE_WINDOWS_SHORT_DIR}"
else
export CHE_HOME="$(dirname "$(cd "$(dirname "${0}")" && pwd -P)")"
fi
fi

if [[ "${CHE_IP}" != "" ]]; then
Expand Down