https://bugs.winehq.org/show_bug.cgi?id=49457
Bug ID: 49457 Summary: Simple command in powershell 6 (pwsh) containing "$" only works for me if the dollar sign is escaped Product: Wine Version: 5.11 Hardware: x86 URL: https://github.com/PowerShell/PowerShell/releases/down load/v6.1.6/PowerShell-6.1.6-win-x64.msi OS: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: xerox.xerox2000x@gmail.com Distribution: ---
I tried simple command like
wine pwsh.exe /c $env:username
and it gives ":username"
If one escapes the dollarsign it works correctly:
wine pwsh.exe /c $env:username
gives "louis"
When you first start powershell console like "wine start pwsh", and type in the console it works correctly (without the escape character)
I tried 1st command in Windows 7 cmd, and it works correctly (so without having to add the escape character)
(The same story above holds for powershell 2.0 in wine too, but that is more troublesome to get installed due to few bugs in bugilla, so i files it here for pwsh.exe)
https://bugs.winehq.org/show_bug.cgi?id=49457
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID
--- Comment #1 from Alexandre Julliard julliard@winehq.org --- If you call it directly from the Unix shell, you need to escape shell metacharacters. There's nothing Wine can do about this.
https://bugs.winehq.org/show_bug.cgi?id=49457
--- Comment #2 from Louis Lenders xerox.xerox2000x@gmail.com --- Created attachment 67558 --> https://bugs.winehq.org/attachment.cgi?id=67558 test executable, should output major and minor version of powershell (e.g. 2 0 )
(In reply to Alexandre Julliard from comment #1)
If you call it directly from the Unix shell, you need to escape shell metacharacters. There's nothing Wine can do about this.
Ah I see, thanks for info. I was trying to find out why Waves Central installer was failing and thought this might be possible reason, but indeed this is not the cause for failing installer.
For info , mainly for myself ;) I attach simple test program that does what Waves Central does, this executable does
CreateProcessW(NULL, L"cmd.exe /d /s /c powershell.exe Write-Host $PSVersionTable.PSVersion.Major $PSVersionTable.PSVersion.Minor";, NULL, NULL, FALSE, 0, NULL, NULL, &stinf, &info))
and it works fine once I install powershell
I think installer fails for other reason, I`ll just open new bugreport for that
Sorry for the noise
Regards
https://bugs.winehq.org/show_bug.cgi?id=49457
--- Comment #3 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=49457
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=49457
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://github.com/PowerShe |https://web.archive.org/web |ll/PowerShell/releases/down |/20210702121923/https://git |load/v6.1.6/PowerShell-6.1. |hub.com/PowerShell/PowerShe |6-win-x64.msi |ll/releases/download/v6.1.6 | |/PowerShell-6.1.6-win-x64.m | |si CC| |focht@gmx.net