OSDN Git Service

refs #344 インストールのとき,依存ライブラリも一緒にプラグインディレクトリへコピーするように変更した.
[stigmata/stigmata.git] / src / main / java / jp / sourceforge / stigmata / command / ExportConfigCommand.java
index 0f16268..f572ad7 100644 (file)
@@ -20,9 +20,9 @@ public class ExportConfigCommand extends AbstractStigmataCommand{
     }
 
     @Override
-    public void perform(Stigmata stigmata, BirthmarkContext context, String[] args){
+    public boolean perform(Stigmata stigmata, BirthmarkContext context, String[] args){
+        PrintWriter out = null;
         try{
-            PrintWriter out;
             if(args == null || args.length == 0){
                 out = new PrintWriter(System.out);
             }
@@ -34,8 +34,13 @@ public class ExportConfigCommand extends AbstractStigmataCommand{
             }
 
             new ConfigFileExporter(context.getEnvironment()).export(out);
-            out.close();
+            return true;
         }catch(IOException e){
+            return false;
+        } finally{
+            if(out != null){
+                out.close();
+            }
         }
     }
 }