Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Ritchie doesn't find the $HOME PATH with space #438

Closed
GuillaumeFalourd opened this issue Aug 14, 2020 · 1 comment
Closed

Ritchie doesn't find the $HOME PATH with space #438

GuillaumeFalourd opened this issue Aug 14, 2020 · 1 comment
Assignees
Labels
🪲 bug Report a bug encountered while operating Ritchie
Milestone

Comments

@GuillaumeFalourd
Copy link
Contributor

GuillaumeFalourd commented Aug 14, 2020

What happened:

Screen Shot 2020-08-14 at 18 00 45

This may be related with this script:

bat-windows:
	echo '@ECHO OFF' > $(BAT)
	echo 'SET mypath=%~dp0' >> $(BAT)
	echo 'start /B /WAIT %mypath:~0,-1%/windows/main.exe' >> $(BAT)

Getting this mypath variable (would use "%~dp0" variable between " " resolve the problem ?)

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.

ex: \Users\Dennis Ritchie\

Anything else we need to know?:

  • You rock !

Environment:

  • Ritchie version (use rit --version): 2.0.3
  • Operating System: Window OS
  • Network plugin / Tool and version (if this is a network-related / tool bug):
  • Others:
@GuillaumeFalourd GuillaumeFalourd added the 🪲 bug Report a bug encountered while operating Ritchie label Aug 14, 2020
@kaduartur kaduartur changed the title [BUG] Ritchie doesn't find the $HOME PATH with space Ritchie doesn't find the $HOME PATH with space Sep 8, 2020
@lucasdittrichzup lucasdittrichzup self-assigned this Sep 10, 2020
@lucasdittrichzup lucasdittrichzup added this to the 2.0.6 milestone Sep 10, 2020
@lucasdittrichzup
Copy link
Contributor

After analyzing the request, we found that the cause of the problem lies in the formula scripts, but specifically in that part:

# build.bat

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

In the tests we performed, for the binary to run successfully for "composite users" (eg Lucas Dittrich) 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%%/'

So, we are closing this activity and we will open one in the formula repository for proper adjustment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🪲 bug Report a bug encountered while operating Ritchie
Projects
None yet
Development

No branches or pull requests

2 participants