Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix argument passing in the Windows run.bat script. #603

Merged
merged 1 commit into from
May 20, 2022
Merged

Fix argument passing in the Windows run.bat script. #603

merged 1 commit into from
May 20, 2022

Conversation

gouttegd
Copy link
Contributor

Windows has a peculiar way of interpreting quotes in command line arguments: if the opening quote is not at the beginning of the argument, then it is deemed to be part of the argument.

That is, with

ARGUMENT='something'

the ARGUMENT variable is assigned a value of 'something', including the quotes.

To make sure the quotes are only used, well, for quoting, and do not end up in the assigned value, the opening quote must be the first character of the argument, as in:

'ARGUMENT=something'

This results in ARGUMENT being correctly assigned the value something, without quotes.

closes #583

Windows has a peculiar way of interpreting quotes in command line
arguments: if the opening quote is not at the beginning of the argument,
then it is deemed to be part of the argument.

That is, with

  ARGUMENT='something'

the ARGUMENT variable is assigned a value of 'something', *including*
the quotes.

To make sure the quotes are only used, well, for quoting, and do not end
up in the assigned value, the opening quote must be the first character
of the argument, as in:

  'ARGUMENT=something'

This results in ARGUMENT being correctly assigned the value something,
*without* quotes.

closes #583
@gouttegd gouttegd self-assigned this May 20, 2022
@matentzn
Copy link
Contributor

WOW that was it? You tested it on a windows machine?

@gouttegd
Copy link
Contributor Author

gouttegd commented May 20, 2022

I got temporary access to a Windows machine and I could at least test that the shell does behave as described, which makes me pretty confident this is the cause of #583.

I did not test the ODK itself on that machine, though – I though it would have been rude to install the ODK on a machine that a friend let me use after I asked him “can I quickly check something on your computer”… :D

Unless/until we got someone working on Windows in the team I think this is the best we can do.

@matentzn
Copy link
Contributor

No worries I can test it. can be worse than what we had.

@gouttegd gouttegd merged commit a7898bf into INCATools:master May 20, 2022
@gouttegd gouttegd deleted the fix-windows-script branch May 20, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ODK failing on Windows
2 participants