I ran into an issue on Windows when installing a private package that has a dependency to another private package. The dependency box.json has a “directory” attribute that looks like:
"directory":"/webroots"
The expected behavior, (as far as I know), is to install the package in /webroots on non-windows machines. On windows machines, I would expect it to install to the root of the CWD in “webroots” folder. (so in my case that would be, C:\webroots)
What actually happens is the package is installed to “./webroots”, (note the leading period) relative to the CWD.
The same behavior can be seen with commandbox’ “cd” command and various other shell commands
`
CommandBox:System32> pwd
C:\Windows\System32
CommandBox:System32> cd /webroots
ERROR (3.4.0+00519)
C:\Windows\System32\webroots: No such file or directory
CommandBox:System32> dir /webroots
No files/directories found.
`
Here’s the output from a dos prompt (cmd.exe) for comparison:
`
C:\Windows\System32>pwd
/c/Windows/System32
C:\Windows\System32>cd /webroots
C:\webroots>echo it works in cmd prompt shell
it works in cmd prompt shell
`
Powershell behaves in the same manner as cmd.exe but I’ll spare you the additional output. I understand that windows/dos uses a backslash as the official path separator and support for the forward slash varies from shell to shell. What I’m curious about is if commandbox’ treatment of the forward slash was a design decision, a bug, or functionality that just doesn’t exist yet.
Thanks Fellas,
Joel