January 24, 2019

bash: C:/Program: No such file or directory error solution in git bash with windows directory path having spaces

Hi friends,

Today, I have come across a situation where I have to execute the gitbash on windows with linux commands.

The escape character doesn't alone solve the problem

Problem


Setting up an alias for bash where the path includes space

$ alias DOCKER_HOME=C:/Program Files/Docker/Docker

Error

bash: C:/Program: No such file or directory

Solution

$ alias DOCKER_HOME=C:/"Program\ Files"/Docker/Docker

Hope my solution helps you in resolving the issue.

Please send your feedback and comments to psrdotcom@gmail.com

No comments:

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com