[java-identity-provider] branch main updated: Better error reporting and allow for directory creation on new files.

Scott Cantor cantor.2 at osu.edu
Wed Sep 16 20:49:03 UTC 2020


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=330e56b7b1d6c8b157f0864feade4c6bb970e0e9

The following commit(s) were added to refs/heads/main by this push:
       new  330e56b7b Better error reporting and allow for directory creation on new files.
330e56b7b is described below

commit 330e56b7b1d6c8b157f0864feade4c6bb970e0e9
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 16 16:48:54 2020 -0400

    Better error reporting and allow for directory creation on new files.
---
 .../src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java       | 1 +
 .../src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java b/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java
index b38d80b23..e9cfe01ff 100644
--- a/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java
+++ b/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java
@@ -394,6 +394,7 @@ public abstract class AbstractIdPModule implements IdPModule {
                     throw new ModuleException("Module asked to create file outside of IdP installation");
                 }
 
+                Files.createDirectories(destPath.getParent());
                 Files.copy(srcStream, destPath, StandardCopyOption.REPLACE_EXISTING);
                 log.debug("Module {} created {}", getId(), destPath);
                 return result;
diff --git a/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java b/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java
index bded70ffe..4ed5f4ac1 100644
--- a/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java
+++ b/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java
@@ -102,6 +102,7 @@ public final class ModuleManagerCLI extends AbstractIdPHomeAwareCommandLine<Modu
                 doManage(moduleContext, args);
             }
         } catch (final ModuleException e) {
+            System.out.println(e.getMessage());
             System.out.println(ANSIColors.ANSI_RED + "[FAILED]" + ANSIColors.ANSI_RESET);
             System.out.println();
             return RC_INIT;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list