Fix install command on Windows
Windows absolute paths cannot be processed by the CLI compiler, so the install command wasn't working on Windows. This change converts ths path to a URI first and then it works as a Spring Resource.
This commit is contained in:
@@ -140,6 +140,7 @@ public class InstallCommand extends OptionParsingCommand {
|
||||
|
||||
for (URL url : urlsToProcess) {
|
||||
File file = toFile(url);
|
||||
Log.info("Processing: " + file);
|
||||
if (file.getName().endsWith(".jar")) {
|
||||
processor.processFile(file);
|
||||
}
|
||||
@@ -181,7 +182,8 @@ public class InstallCommand extends OptionParsingCommand {
|
||||
finally {
|
||||
stream.close();
|
||||
}
|
||||
return file.getAbsolutePath();
|
||||
// Windows paths get tricky unless you work with URI
|
||||
return file.getAbsoluteFile().toURI().toString();
|
||||
}
|
||||
|
||||
private static File getDefaultLibDirectory() {
|
||||
|
||||
Reference in New Issue
Block a user