CommandBox on MacOS issue: I have a server share m...
# box-products
b
CommandBox on MacOS issue: I have a server share mounted at /Volumes/ShareName/web/. When I navigate to the share location in the terminal and do a box start there, it instead uses ~/web/ on my local drive as the source files, even though within commandbox in the terminal it still thinks it is in the share. I will note that I copied the files over from ~/web/ on my local drive, but I don’t feel like that should have been an issue.
b
@bendur I would guess you had a previous server defined in that folder which pointed to another web root
Before nuking the server, did you run
Copy code
server info --verbose
to see what info CommandBox had on that server?
b
I didn’t, but that would have been a good idea.
b
Yep, do that next time. 🙂
b
Does CommandBox save/cache that info somewhere besides server.json?
b
Well, the info I wanted you to look at actually doesn't come from your
server.json
b
Right, I figured
b
Though, it wouldn't have hurt to see that either
b
It was pretty bare bones
b
server.json
contains the definition for how CommandBox will start the server the next time you run
server start
The
servers.json
file inside your box home dir which powers the output of the
server info
command shows you the values that were used the last time you ran
server start
b
ah, I see the server list has paths saved, and since it shared the same name as another server it used the other path.
I could have just changed the server name and cleared it up that way right?
b
So, for instance, even if you don't have a
server show app.serverHomeDirectory
set in your
server.json
you can always run
Copy code
server info property=serverHomeDirectory
to see the actual runtime value
👍🏻 1
Which could have come from config setting
server.defaults
, a
server.json
file or env var overrides
It should be impossible to get two servers in different directories with the same name FWIW
If that ever happens, first ensure you're on the latest CommandBox, and secondly run
server forget name-here
until they are all gone
Because they will cause issues for sure
b
cool, thanks for the help!
👍 1