@@ -367,6 +367,10 @@ object SetupApp {
367367 }
368368
369369 private fun resolveGenerateGamePath (setup : SetupMain , wc3Patch : String? ): Path ? {
370+ if (setup.gamePathOptedOut) {
371+ log.info(" Warcraft III path: not configured by choice." )
372+ return null
373+ }
370374 val gameRoot = setup.gamePath ? : Wc3ClientDetector .detectGameRoot()
371375 val clientInfo = Wc3ClientDetector .inspectGameRoot(gameRoot)
372376 if (clientInfo == null ) {
@@ -595,7 +599,8 @@ object SetupApp {
595599 useInteractiveMenus = useInteractiveMenus,
596600 currentPatch = setup.wc3Patch
597601 )
598- setup.gamePath = selectGamePath(prompt, setup.wc3Patch, setup.gamePath)
602+ setup.gamePathOptedOut = false
603+ setup.gamePath = selectGamePath(setup, prompt, setup.wc3Patch, setup.gamePath)
599604
600605 val agentsDefault = if (setup.addAgents) " Y" else " N"
601606 val agentsInput = prompt(" Add AGENTS.md?" , agentsDefault) ? : agentsDefault
@@ -632,6 +637,7 @@ object SetupApp {
632637 }
633638
634639 private fun selectGamePath (
640+ setup : SetupMain ,
635641 prompt : (String , String? ) -> String? ,
636642 wc3Patch : String? ,
637643 currentPath : Path ?
@@ -648,6 +654,7 @@ object SetupApp {
648654 val default = detected?.toAbsolutePath()?.normalize()?.toString() ? : " none"
649655 val answer = prompt(" Warcraft III directory (or none)" , default)?.trim() ? : return detected
650656 if (answer.equals(" none" , ignoreCase = true ) || answer.equals(" skip" , ignoreCase = true )) {
657+ setup.gamePathOptedOut = true
651658 return null
652659 }
653660 val selected = Paths .get(answer).toAbsolutePath().normalize()
0 commit comments