You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the docker.save.file system property is used to override the output location for docker:save and the property value is just a file name without a directory, the plugin throws an NPE.
Info
d-m-p version : 0.29-SNAPSHOT
Maven version (mvn -v) : 3.5.4
The issue is in ensureSaveDir(), which does not check for a null result from getParentFile(), which happens when the File does not specify a directory.
private void ensureSaveDir(String fileName) throws MojoExecutionException {
File saveDir = new File(fileName).getParentFile();
if (!saveDir.exists()) {
if (!saveDir.mkdirs()) {
throw new MojoExecutionException("Can not create directory " + saveDir + " for storing save file");
}
}
}
I will submit a PR to fix, it's easy.
The text was updated successfully, but these errors were encountered:
wrosenuance
added a commit
to wrosenuance/docker-maven-plugin
that referenced
this issue
Apr 11, 2019
* Issue #1203 NPE if docker:save called with filename only.
Signed-off-by: William Rose <william.rose@nuance.com>
* Issue #1205 Increase GZIP compression speed for docker:save.
Signed-off-by: William Rose <william.rose@nuance.com>
Description
If the docker.save.file system property is used to override the output location for docker:save and the property value is just a file name without a directory, the plugin throws an NPE.
Info
mvn -v
) : 3.5.4The issue is in ensureSaveDir(), which does not check for a null result from getParentFile(), which happens when the File does not specify a directory.
I will submit a PR to fix, it's easy.
The text was updated successfully, but these errors were encountered: