tobysmith568/run-in-powershell

Each parenthesis in the project path throws errors

SamLowryMOI opened this issue · 4 comments

Some examples:

C:\Projects(6.0)\test.ps1
C:\Projects(\test.ps1
C:\Projects(a\test.ps1
C:\Projects()\test.ps1
C:\Projects)\test.ps1

Run-in-powershell does not work with paths like these.

Errors:
C:\PSProjects\Sample(a\test.ps1

ParserError:
Line |
   1 |  cd c:\PSProjects\Sample(a ; & c:\PSProjects\Sample(a\test.ps1
     |                           ~
     | Missing closing ')' in expression.

C:\PSProjects\Sample (6.0)\test.ps1

Set-Location: A positional parameter cannot be found that accepts argument '6'.
&: The term 'c:\PSProjects\Sample ' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

May you fix this? Please?

Hey @SamLowryMOI

Sorry it's taken me so long to get back to you. I believe I've fixed this as a part of #19.

Would you mind opening VS Code and verifying that this is resolved? Please make sure you have version 1.2.0 of the extension installed before doing so!

Thanks :)

Would you mind opening VS Code and verifying that this is resolved?

Sure, with pleasure. Everything works as expected with the new version, with Windows Powershell and Powershell Core, normally and as administrator. Thank you very much.

Great, thanks :)

Sorry, it's me again. I don't know if I should open a new issue, I'll just try it here.

A '&' in the path also causes error messages. May you please fix that as well?