From 1cc2bcdffeb958c7c70c6171feb0899d37eaabee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 10:24:55 +0000 Subject: [PATCH 1/2] Initial plan From d620c666257ec3a75ef2845d161a70bf63e675be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 10:26:56 +0000 Subject: [PATCH 2/2] Fix fwreinit not recognizing webroot setting in server.json Agent-Logs-Url: https://github.com/ColdBox/coldbox-cli/sessions/23d22b0d-2e9c-43e3-9a8b-475aa8bc5460 Co-authored-by: lmajano <137111+lmajano@users.noreply.github.com> --- commands/coldbox/reinit.cfc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/commands/coldbox/reinit.cfc b/commands/coldbox/reinit.cfc index 414206c..2f74fad 100644 --- a/commands/coldbox/reinit.cfc +++ b/commands/coldbox/reinit.cfc @@ -18,19 +18,19 @@ component aliases="fwreinit" { /** * @password The FWReinit password - * @name Name of the CommandBox server to reinit + * @name Name of the CommandBox server to reinit, will default to the name listed in server.json file * @showUrl Show the Url to reinit **/ function run( password = "1", - name = "", + name = getDefaultServerName(), showUrl = true ){ - var serverInfo = serverService.getServerInfoByDiscovery( getCWD(), arguments.name ); + var serverInfo = serverService.getServerInfoByDiscovery( name = arguments.name ); if ( !structCount( serverInfo ) ) { print.boldRedLine( - "No server configurations found for '#getCWD()#', so have no clue what to reinit buddy!" + "No server configurations found for '#getCWD()#' and '#arguments.name#', so have no clue what to reinit buddy!" ); } else { var thisURL = "#serverInfo.host#:#serverInfo.port#/?fwreinit=#arguments.password#"; @@ -50,4 +50,9 @@ component aliases="fwreinit" { } } + private function getDefaultServerName(){ + var serverInfo = serverService.getServerInfoByDiscovery( serverConfigFile = "server.json" ); + return serverInfo.keyExists( "name" ) ? serverInfo.name : ""; + } + }