mirror of https://github.com/apache/maven.git
[MNG-7038] Fixes for topDirectory (#1100)
Changes: * resolve file argument against workingDirectory explicitly * the check Files.isRegularFile should happen against path
This commit is contained in:
parent
8b8f2c3ddd
commit
bec53b34e3
|
@ -332,10 +332,10 @@ public class MavenCli {
|
|||
for (String arg : cliRequest.args) {
|
||||
if (isAltFile) {
|
||||
// this is the argument following -f/--file
|
||||
Path path = Paths.get(arg);
|
||||
Path path = topDirectory.resolve(arg);
|
||||
if (Files.isDirectory(path)) {
|
||||
topDirectory = path;
|
||||
} else if (Files.isRegularFile(topDirectory)) {
|
||||
} else if (Files.isRegularFile(path)) {
|
||||
topDirectory = path.getParent();
|
||||
if (!Files.isDirectory(topDirectory)) {
|
||||
System.err.println("Directory " + topDirectory
|
||||
|
|
Loading…
Reference in New Issue