get error when typing upgrade --latest per brad's suggestion

get error when typing upgrade --latest per brad’s suggestion

invalid call of the function run (C:\Users\Jeremy.CommandBox\cfml\system\commands\upgrade.cfc), first Argument (force) is of invalid type, can’t cast
String [–latest] to a value of type [boolean]
at railo.runtime.type.UDFImpl.castToAndClone(UDFImpl.java:98):98
at railo.runtime.type.UDFImpl.defineArguments(UDFImpl.java:144):144
at railo.runtime.type.UDFImpl._call(UDFImpl.java:304):304
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:194):194
at railo.runtime.ComponentImpl._call(ComponentImpl.java:624):624
at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506
at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1755):1755
at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755):755
at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1564):1564
at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/services/CommandService.cfc:189):189
at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/services/CommandService.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:92):92
at railo.runtime.type.UDFImpl._call(UDFImpl.java:306):306
at railo.runtime.type.UDFImpl.call(UDFImpl.java:207):207
at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623
at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1738):1738
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1554):1554
at system.shell_cfc$cf.udfCall2(/commandbox/system/Shell.cfc:382):382
at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:92):92
at railo.runtime.type.UDFImpl._call(UDFImpl.java:306):306
at railo.runtime.type.UDFImpl.call(UDFImpl.java:207):207
at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:748):748
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1554):1554
at system.shell_cfc$cf.udfCall2(/commandbox/system/Shell.cfc:357):357
at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:92):92
at railo.runtime.type.UDFImpl._call(UDFImpl.java:306):306
at railo.runtime.type.UDFImpl.call(UDFImpl.java:207):207
at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623
at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1738):1738
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1554):1554
at users.jeremy._commandbox46.cfml.system.bootstrap_cfm$cf.call(/Users/Jeremy/.CommandBox/cfml/system/Bootstrap.cfm:44):44
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:913):913
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:865):865
at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:206):206
at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2218):2218
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2185):2185
at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:332):332
at railo.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:625):625
at railo.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:249):249
at railocli.CLIMain.run(CLIMain.java:75):75
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source):-1
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source):-1
at java.lang.reflect.Method.invoke(Unknown Source):-1
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:210):210

You may be on a very old version of CommandBox that doesn’t support the --latest flag, or flags in general. it appears that it’s trying to use that as a positional parameter for the force attribute.

Running the “version” command will tell us what version you’re on.

Delete the .CommandBox folder in your user directory and re-download the latest CommandBox binary and it will extract everything fresh.