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

problem with alias in powershell #1017

Closed
nerdvegas opened this issue Feb 1, 2021 · 7 comments · Fixed by #1056
Closed

problem with alias in powershell #1017

nerdvegas opened this issue Feb 1, 2021 · 7 comments · Fixed by #1056
Labels

Comments

@nerdvegas
Copy link
Contributor

From tests:

Line |
   4 |  function alias_test() { "echo test_echo" $args }
     |                                           ~~~~~
     | Unexpected token '$args' in expression or statement.

Seems related to: https://github.com/nerdvegas/rez/blob/master/src/rez/tests/test_shells.py#L384
I'm unsure as to why quotes are included in the alias command.

@nerdvegas nerdvegas added the bug label Feb 1, 2021
@instinct-vfx
Copy link
Contributor

I can hopefully look into this. There is an issue with PowerShell that we discussed earlier somewhere in that the command vs. parameter escapes are different and hence plain concatenating them causes issues. It's too late atm for me to remember the specifics will try and come up with a more helpful reply tomorrow.

@nerdvegas
Copy link
Contributor Author

nerdvegas commented Feb 1, 2021 via email

@instinct-vfx
Copy link
Contributor

I will try to take a look into it today. Seems @skral added this as part of other Windows fixes. Also keep in mind that different versions of PowerShell might have quite some difference.

@instinct-vfx
Copy link
Contributor

How can i inspect or reproduce the error? I tried grabbing the lastest release and running the standard selftests. That yielded some weird results (the cmd tests being run in powershell trigger vscode to open the pyfiles mid-test run and i am also seeing some other oddities i wanna look into) but this particular one i do not see.

@nerdvegas
Copy link
Contributor Author

nerdvegas commented Feb 2, 2021 via email

@instinct-vfx
Copy link
Contributor

Got it now. And after cross checking it happens in all workflows on all platforms. Will try to look into this.

@instinct-vfx
Copy link
Contributor

So i am pretty sure it is only a bug in the test definition itself. I tried building actual aliases locally and that seems to work just fine. Also removing the double quotes prevents the error locally for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants