Ok, I see your problem. You’ve hit an unfortunate little chicken/egg bug in CommandBox. Basically, when you have a ${serverinfo.foobar}
place holder in your server.json
, which is being evaluated in the context of a server-related package script, then there is a routine that takes the name of the current server to look up the details for that server in order to resolve the system setting placeholder. But the routine for looking up the details for a server, involve reading the server.json
for that server and expanding any system setting place holders inside of it. This puts us into endless recursion as CommandBox can’t resolve the serverinfo system setting because it can’t determine the details of the server being processed, and it can’t determine the details of the server being processed because it can’t resolve the serverinfo system setting expansions in the server.json
.
I assume this used to work, but we added some code paths over time which allows the catch-22 scenario.
As a workaround, can you please specify your ${serverinfo:serverHomeDirectory}
system setting expansion to specify the name of the server like so?
${serverinfo:serverHomeDirectory@myServerName}
this should change the internal code path that looks up the server details to avoid the recursion of doom. I’ll address this bug in the next version of CommandBox.