When calling the getBaseTemplatePath() function from JSR-223 (in a CommandBox task runner, for example) an error is thrown:
I get that is technically correct but this makes some CFML modules impossible to use from the CLI if they use that method and there's no good way to test if the method will work or not other than just wrapping it in a try/catch. I noticed that the cgi.script_name is spoofed to just show /index.cfm from JSR-223. Can this function return the same spoofed path? Or, even better, return the first included file. For instance, all of CommandBox runs inside of a Bootstrap.cfm file which would be a logical response from that function.
Related bug in MockData.cfc library which won't work inside CommandBox currently: