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

Quotation marks issues on Windows. #691

Closed
KelSolaar opened this issue Aug 12, 2019 · 15 comments
Closed

Quotation marks issues on Windows. #691

KelSolaar opened this issue Aug 12, 2019 · 15 comments

Comments

@KelSolaar
Copy link
Contributor

Hi,

I'm testing 2.40.1 to upgrade from 2.16.0 and I'm having issues with quotation marks on Windows.

Specifically:

C:\Users\thomas>rez-env substance_painter -- "Substance Painter"
'Substance' is not recognized as an internal or external command,
operable program or batch file.

It could be related to #664 but I'm not sure yet, I will try to take a look.

Cheers,

Thomas

@nerdvegas
Copy link
Contributor

nerdvegas commented Aug 13, 2019 via email

@KelSolaar
Copy link
Contributor Author

Hi @nerdvegas,

Confirming that 2.35.0 introduced the issue, 2.34.0 is working as expected! I will look at what the PR changed.

Cheers,

@KelSolaar
Copy link
Contributor Author

So quickly comparing the generated rez-shell.bat and the command call:

Rez 2.34.0

rez-shell.bat

set REZ_ENV_PROMPT=%REZ_ENV_PROMPT%$G
call c:\users\thomas\appdata\local\temp\rez_context_azh6ou\context.bat
set REZ_STORED_PROMPT=$P$G
set PROMPT=%REZ_ENV_PROMPT% $P$G
"Substance Painter"
exit %errorlevel%

Command Call

['c:\\windows\\system32\\cmd.exe', '/Q', '/C', 'call c:\\users\\thomas\\appdata\\local\\temp\\rez_context_azh6ou\\rez-shell.bat']

Rez 2.35.0

rez-shell.bat

set REZ_ENV_PROMPT=%REZ_ENV_PROMPT%$G
call c:\users\thomas\appdata\local\temp\rez_context_mjdt6d\context.bat
set REZ_STORED_PROMPT=$P$G
set PROMPT=%REZ_ENV_PROMPT% $P$G

Command Call

['c:\\windows\\system32\\cmd.exe', '/Q', '/C', 'call c:\\users\\thomas\\appdata\\local\\temp\\rez_context_mjdt6d\\rez-shell.bat', '& Substance Painter']

The double-quotes are effectively gone but to make matter worse, tweaking the code so that the command call is as follows:

['c:\\windows\\system32\\cmd.exe', '/Q', '/C', 'call c:\\users\\thomas\\appdata\\local\\temp\\rez_context_beyump\\rez-shell.bat', '& "Substance Painter"']

still errors out:

'\"Substance Painter\"' is not recognized as an internal or external command,
operable program or batch file.

Haven't followed exactly the PR discussions, I'm wondering what was the rationale for this separation compared to having everything in the .bat file?

@KelSolaar
Copy link
Contributor Author

KelSolaar commented Aug 13, 2019

@mottosso : I suppose this current issue was introduced with #627, any idea of how to circumvent that?

@nerdvegas
Copy link
Contributor

nerdvegas commented Aug 13, 2019 via email

@KelSolaar
Copy link
Contributor Author

Ah! We just cross-posted @nerdvegas :]

@nerdvegas
Copy link
Contributor

nerdvegas commented Aug 16, 2019 via email

@KelSolaar
Copy link
Contributor Author

Hey @nerdvegas,

I spent a few hours but I, unfortunately, could not get it to work at all. I would probably suggest to revert the PR unless @mottosso has an idea.

Cheers,

Thomas

@nerdvegas
Copy link
Contributor

nerdvegas commented Aug 19, 2019 via email

@instinct-vfx
Copy link
Contributor

Thanks are a bit busy here currently but i will try to look into it or have someone here look into it in the meantime.

@Jordibastide
Copy link

Jordibastide commented Aug 22, 2019

Hi all,

I'm encountering a linked issue with CMakeBuildSystem.build_systems values that results to non quoted generators names in cmake commands

Thanks

@bfloch
Copy link
Contributor

bfloch commented Aug 26, 2019

I got it covered in my shell branch. Yes I reverted the commit but also I introduced proper whitespace formatting in cmd.join.

bfloch added a commit to bfloch/rez that referenced this issue Aug 26, 2019
This introduced quotation issues as detailed in AcademySoftwareFoundation#691

This reverts commit e513b69.

# Conflicts:
#	src/rezplugins/shell/cmd.py
@nerdvegas
Copy link
Contributor

nerdvegas commented Aug 28, 2019 via email

bfloch added a commit to bfloch/rez that referenced this issue Sep 6, 2019
This introduced quotation issues as detailed in AcademySoftwareFoundation#691

This reverts commit e513b69.

# Conflicts:
#	src/rezplugins/shell/cmd.py
@KelSolaar
Copy link
Contributor Author

Looks like this is fixed in https://github.com/nerdvegas/rez/releases/tag/2.47.0

@nerdvegas
Copy link
Contributor

Closed by #698

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

No branches or pull requests

5 participants