Skip to content

Commit

Permalink
Issue #1203 NPE if docker:save called with filename only. (#1204)
Browse files Browse the repository at this point in the history
Signed-off-by: William Rose <william.rose@nuance.com>
  • Loading branch information
wrosenuance authored and rhuss committed Apr 12, 2019
1 parent cef79cf commit 4097464
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* **0.29-SNAPSHOT**
- Restore ANSI color to Maven logging if disabled during plugin execution and enable color for Windows with Maven 3.5.0 or later. Color logging is enabled by default, but disabled if the Maven CLI disables color (e.g. in batch mode) ([#1108](https://github.com/fabric8io/docker-maven-plugin/issues/1108))
- Fix NPE if docker:save is called with -Dfile=file-name-only.tar ([#1203](https://github.com/fabric8io/docker-maven-plugin/issues/1203))

* **0.29.0** (2019-04-08)
- Avoid failing docker:save when no images with build configuration are present ([#1185](https://github.com/fabric8io/docker-maven-plugin/issues/1185))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/fabric8/maven/docker/SaveMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private String completeCalculatedFileName(String file) throws MojoExecutionExcep
}

private void ensureSaveDir(String fileName) throws MojoExecutionException {
File saveDir = new File(fileName).getParentFile();
File saveDir = new File(fileName).getAbsoluteFile().getParentFile();
if (!saveDir.exists()) {
if (!saveDir.mkdirs()) {
throw new MojoExecutionException("Can not create directory " + saveDir + " for storing save file");
Expand Down

0 comments on commit 4097464

Please sign in to comment.