Răsfoiți Sursa

fix bug for windows

ruki 3 ani în urmă
părinte
comite
641e4ee7fe

+ 4 - 2
src/main/kotlin/io/xmake/project/XMakeDirectoryProjectGenerator.kt

@@ -29,8 +29,10 @@ class XMakeDirectoryProjectGenerator : DirectoryProjectGeneratorBase<XMakeConfig
         // get content entry path
         val contentEntryPath = baseDir.canonicalPath ?: return
 
-        // create empty project
-        SystemUtils.Runv(
+        /* create empty project
+         * @note we muse use ioRunv instead of Runv to read all output, otherwise it will wait forever on windows
+         */
+        SystemUtils.ioRunv(
             listOf(
                 SystemUtils.xmakeProgram,
                 "create",

+ 4 - 2
src/main/kotlin/io/xmake/project/XMakeModuleBuilder.kt

@@ -32,8 +32,10 @@ class XMakeModuleBuilder : ModuleBuilder() {
             LocalFileSystem.getInstance().refreshAndFindFileByPath(FileUtil.toSystemIndependentName(contentEntryPath))!!
         contentEntry.addSourceFolder(sourceRoot, false)
 
-        // create empty project
-        SystemUtils.Runv(
+        /* create empty project
+         * @note we muse use ioRunv instead of Runv to read all output, otherwise it will wait forever on windows
+         */
+        SystemUtils.ioRunv(
             listOf(
                 SystemUtils.xmakeProgram,
                 "create",