So basically what we have here is the fact that there’s a handful of different ways to install ColdBox and its difficult to cater to each of them. What CommandBox does with the directory parameter is that’s the base folder where it unpacks the ColdBox framework, but the framework zip file INCLUDES the “coldbox” folder so you can’t really get out of it having that name. Ideally, we wouldn’t have the “coldbox” folder in the zip file, but removing it would break ForgeBox’s backwards compatibility with other install methods like the the CF Builder Ext and people just wanting to do a manual install because those method just grab the same zip from ForgeBox and and unpack them in the web root.
So, if you want to get fancy and have multiple versions of ColdBox, you’ll have to do some manual steps (and CommandBox won’t be able to uninstall the package unless you also update the install location in your box.json.
So first, a couple of notes:
> install coldbox-be --directory=c:\dev\apps\coldbox-4.0.0
That syntax won’t work as you’re trying to use “directory” as a boolean flag. The “–” is reserved only for true/false parameters. Valid syntaxes would be:
install coldbox-be c:\dev\apps\coldbox-4.0.0
install slug=coldbox-be directory=c:\dev\apps\coldbox-4.0.0
More information can be found on CommandBox syntax in our docs here:
> it always installs it in a folder named coldbox in the commandbox root folder
Yes, that’s a little weird and undoubtedly due to the errant “–” that is probably setting the directory parameter to “true”.
So, since the ColdBox zip actually includes the “coldbox” folder in its root, you can use the mv command to rename the folder whatever you want.
// Change in to the root of your app
// Install coldbox-be
// Rename the folder
mv coldbox coldbox-4.0.0
// OPTIONAL: update the install path
package set installpaths.coldbox-be=coldbox-4.0.0
Note, that last command will error if you don’t update to the bleeding edge as I just now fixed a bug in package properties that have a dash in them.
ColdBox Platform Evangelist
Ortus Solutions, Corp
ColdBox Platform: http://www.coldbox.org