liferay / liferay-cli

Apache License 2.0
4 stars 5 forks source link

Paths on Windows + GitBash are wrong when starting up the local-dev env #114

Closed ZoltanTakacs closed 1 year ago

ZoltanTakacs commented 1 year ago

zoltan.takacs@DESKTOP-3M79188 MINGW64 ~/tmp $ liferay extension start -b -d /c/Users/zoltan.takacs/tmp/my-client-extensions-workspace/ ✔ 'localdev' sources updated. ✔ 'localdev' images built. Specified Client Extension directory is C:\Users\zoltan.takacs\tmp\c\Users\zoltan.takacs\tmp\my-client-extensions-workspace

❌ It seems that even though I specified the full path for my desired workspace, it also appended the current directory as well to the path.

gamerson commented 1 year ago

Seems like a windows path bug. Maybe Ray can try to reproduce on his windows box. Should be a simple fix.

On Wed, Jan 4, 2023 at 3:53 AM Zoltán Takács @.***> wrote:

@.*** MINGW64 ~/tmp $ liferay extension start -b -d /c/Users/zoltan.takacs/tmp/my-client-extensions-workspace/ ✔ 'localdev' sources updated. ✔ 'localdev' images built. Specified Client Extension directory is C:\Users\zoltan.takacs\tmp\c\Users\zoltan.takacs\tmp\my-client-extensions-workspace

❌ It seems that even though I specified the full path for my desired workspace, it also appended the current directory as well to the path.

— Reply to this email directly, view it on GitHub https://github.com/liferay/liferay-cli/issues/114, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERKFP3KFDUATTXK52O2ZTWQVB73ANCNFSM6AAAAAATQTASRY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Greg Amerson Liferay Cloud. liferay.com

gamerson commented 1 year ago

Hey @ZoltanTakacs what if you try liferay extension start -b -d c:/Users... instead of /c/Users... I'm wondering if there is another syntax that could work? Is this WSL or GitBash Or other?

ZoltanTakacs commented 1 year ago

Hey @gamerson , I've used GitBash, so this could be the reason. It doesn't understand Windows path syntax, see

zoltan.takacs@DESKTOP-3M79188 MINGW64 ~/tmp
$ liferay extension start -b -d c:\Users\zoltan.takacs\tmp\my-client-extensions-workspace
✔ 'localdev' sources updated.
✔ 'localdev' images built.
2023/01/10 15:10:32 mkdir C:\Users\zoltan.takacs\tmp\c:Userszoltan.takacstmpmy-client-extensions-workspace: The directory name is invalid.

Not a big problem, we can ignore it as it works well e.g from PowerShell

█zoltan.takacs@DESKTOP-3M79188██~█
❯ liferay extension start -b -d c:\Users\zoltan.takacs\tmp\my-client-extensions-workspace
✔ 'localdev' sources updated.
✔ 'localdev' images built.
Specified Client Extension directory is  c:\Users\zoltan.takacs\tmp\my-client-extensions-workspace
ZoltanTakacs commented 1 year ago

Well, I've replaced the backslash with slash as you've suggested and it worked 😅

zoltan.takacs@DESKTOP-3M79188 MINGW64 ~/tmp
$ liferay extension start -b -d c:/Users/zoltan.takacs/tmp/my-client-extensions-workspace
✔ 'localdev' sources updated.
✔ 'localdev' images built.
Specified Client Extension directory is  c:/Users/zoltan.takacs/tmp/my-client-extensions-workspace

Thank you! :)