Error when running box coldbox create app myApp command

When I was attempting to create my app using commandBox I ran into an issue when i used the “box coldbox create app myApp” command. It it throwing the following error:

Exception in thread “main” /Users/danielroemer/Sites/lol/coldbox (Is a directory)
at Method)
at cliloader.LoaderCLIMain.removeBinBash(
at cliloader.LoaderCLIMain.execute(
at cliloader.LoaderCLIMain.main(

I attempted to troubleshoot but was unable to resolve the issue. I was in the proper director when I ran the command. The “box install coldbox-be” command worked perfectly that I ran prior.

Any help would be greatly appreciated!

Thanks in advance!

Dan, does the command run if you execute it from the interactive shell?

$> box
ComandBox > coldbox create app myApp



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Yes that worked for me. Looks like it was just an issue when I’m not in the interactive shell.

I think I know what the issue is. There are some checks when the Java wrapper on CommandBox starts up to try and “detect” if the first part of what you typed is an actual file. If so, it tries to run that file as a .cfm file.

Example, you can execute .cfm file like so:
box execute foo.cfm

To make that simpler like other CLIs we also allow you to just type this:
box foo.cfm

The code linked below basically tests the first parameter “foo.cfm” and sees if it is a that exists() and if so it tries to execute it directly instead of parsing the parameters as a command.

The problem is that can also represent directories. (It really should have just been called “Path” in my opinion). Since you already installed Coldbox, the “coldbox” part of “coldbox create app myApp” is being matched as a “File” and the shell is trying to load and execute it.

The fix is we need to ALSO check .isFile() on it.

As a short term workaround, you can not install ColdBox first and use the --installColdBox flag on the “coldbox create app” command, Or just run the “coldbox create app” and “install coldbox” commands in the opposite order.