[MNG-6177] The --file command line option of the Windows and Unix launchers does not work for directory names like "Spaces & Special Char"

This commit is contained in:
Christian Schulte 2017-02-23 03:14:21 +01:00
parent 0db5e32cf5
commit 0b9a30f350
2 changed files with 4 additions and 4 deletions

View File

@ -141,9 +141,9 @@ find_file_argument_basedir() {
found_file_switch=0
for arg in "$@"; do
if [ ${found_file_switch} -eq 1 ]; then
if [ -f ${arg} ]; then
basedir=$(dirname $(readlink -f "${arg}"))
if [ ! -d ${basedir} ]; then
if [ -f "${arg}" ]; then
basedir=$(dirname "$(readlink -f "${arg}")")
if [ ! -d "${basedir}" ]; then
echo "Directory ${basedir} extracted from the -f/--file command-line argument ${arg} does not exist" >&2
exit 1
fi

View File

@ -120,7 +120,7 @@ if not exist "%FILE_ARG%" (
echo POM file %FILE_ARG% specified the -f/--file command-line argument does not exist >&2
goto error
)
call :get_directory_from_file %FILE_ARG%
call :get_directory_from_file "%FILE_ARG%"
if not exist "%POM_DIR%" (
echo Directory %POM_DIR% extracted from the -f/--file command-line argument %FILE_ARG% does not exist >&2
goto error