From 552b7550207297c70a636b69c33a46fa70e125e5 Mon Sep 17 00:00:00 2001 From: Matt Bowersox Date: Mon, 2 Oct 2023 11:58:02 -0500 Subject: [PATCH] Create devc temp dirs on Windows (#420) --- .../tools/common/plugins/util/DevUtil.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java index 79869b26..13b44658 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java +++ b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java @@ -1327,13 +1327,11 @@ private void checkContainerBuildTime(long startTime, File containerBuildContext) private void startContainer() throws PluginExecutionException { try { - if (OSUtil.isLinux() || OSUtil.isMac()) { // Added Mac since started getting permission errors for logs folder - // Allow the server to write to the log files. If we don't create it here docker daemon will create it as root. - runCmd("mkdir -p " + serverDirectory + "/logs"); - // Added two hidden folders since started getting permissions errors on the dropins folder. - runCmd("mkdir -p " + buildDirectory + "/" + DEVC_HIDDEN_FOLDER + "/apps"); - runCmd("mkdir -p " + buildDirectory + "/" + DEVC_HIDDEN_FOLDER + "/dropins"); - } + // Allow the server to write to the log files. If we don't create it here docker daemon will create it as root. + new File(serverDirectory, "logs").mkdirs(); + // Added two hidden folders since started getting permissions errors on the dropins folder. + new File(buildDirectory, DEVC_HIDDEN_FOLDER + "/apps").mkdirs(); + new File(buildDirectory, DEVC_HIDDEN_FOLDER + "/dropins").mkdirs(); info("Starting container..."); String startContainerCommand = getContainerCommand();