ZupIT/ritchie-formulas

Ritchie doesn't find the $HOME PATH with space

lucasdittrichzup opened this issue ยท 10 comments

What happened:

Screen Shot 2020-08-14 at 18 00 45

What you expected to happen:

I expected Ritchie to find the correct path

How to reproduce it (as minimally and precisely as possible):

  • Use Windows OS with your $Home path with a space.
rit demo hello-world

Anything else we need to know?:

Environment:

After analyzing the request, the problem lies in the formula scripts, specifically in that part:

build.bat file

echo SET mypath=%%~dp0 >> %BAT_FILE%
echo start /B /WAIT %%mypath:~0,-1%%/windows/main.exe >> %BAT_FILE%

In the tests performed, for the binary to run successfully for "composite users" (eg Dennis Ritchie) on Windows, the code above should be:

echo SET mypath=%%~dp0 >> %BAT_FILE%                      # Remove that line
echo start /B /WAIT windows/main.exe >> %BAT_FILE%        # Removed part: '%%mypath:~0,-1%%/'

Hi!
Can I work on this?

Sure, I've assigned it to you @MadhavJivrajani
Thank you for contributing ! ๐Ÿ‘

Hi @guilhermefsantoszup,
Thank you for assigning this issue to me, however, I asked for this assignment in haste, I don't have Windows on my system. If I can make changes and contribute according to what you suggested above then I'd love to work on this! If not then it would be better to unassign me and let someone else work on this. I'm so sorry for the confusion caused.

Yes, in fact, the best solution would be to validate the implementation locally before submitting the contribution.
After all, it may be necessary to update another part of the code related to the suggestion above.

But don't worry, you can work on another issue and release this one @MadhavJivrajani

Hey can I take this one?

Hi @resmall ! Sure, I'll assign it to you ๐Ÿ‘๐Ÿผ
Thank you for contributing, feel free to ask any question ๐Ÿ˜„

Hello!
I've just taken a look at it, I've tested it with with go, node and http-config on windows, all showed the same path problem message.

I've just made that suggested change in my local code and it started working.
So from what I understand I'll have to remove all occurrences of %%mypath:~0,-1%%/ and delete the line echo SET mypath=%%~dp0 >> %BAT_FILE%, is that correct?

Also, wouldn't we need to fix this issue in https://github.com/resmall/ritchie-formulas-demo as well?

Thank you!

Hi @resmall , thank you for your message ๐Ÿ‘๐Ÿผ
Your observations are correct. All occurrences will have to be updated, and on both repositories.