mirror of https://github.com/apache/maven.git
[MNG-6223] support -f path/to/dir when detecting .mvn
This commit is contained in:
parent
be22380893
commit
2d4401557c
|
@ -141,7 +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
|
||||
if [ -d "${arg}" ]; then
|
||||
basedir=`cd "${arg}" && pwd -P`
|
||||
elif [ -f "${arg}" ]; then
|
||||
basedir=`dirname "${arg}"`
|
||||
basedir=`cd "${basedir}" && pwd -P`
|
||||
if [ ! -d "${basedir}" ]; then
|
||||
|
|
|
@ -120,7 +120,11 @@ 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%"
|
||||
if exist "%FILE_ARG%\*" (
|
||||
set "POM_DIR=%FILE_ARG%"
|
||||
) else (
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue