Install-VSCode.ps1 fails when run as documented in ReadMe.md
@SydneyhSmith arbeitet bereits daran.
Seit 09.2.2023.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
ReadMe.md has a one-liner to install Visual Studio Code. However when trying to actually run that command (in Windows 10 Sandbox), it fails.
Exact commands and output in the "steps to reproduce" section below. I can create a PR that updates the ReadMe.md command to download it to a temporary file first before running it; let me know how you think this should be resolved.
PowerShell Version
PS C:\Users\WDAGUtilityAccount> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.2364
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2364
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Visual Studio Code Version
PS C:\Users\WDAGUtilityAccount> code --version
1.75.0
e2816fe719a4026ffa1ee0189dc89bdfdbafb164
x64
Extension Version
PS C:\Users\WDAGUtilityAccount> code --list-extensions --show-versions | Select-String powershell
ms-vscode.powershell@2023.1.0
Steps to Reproduce
Run the command exactly as documented in ReadMe.md:
PS C:\Users\WDAGUtilityAccount> iex (iwr https://raw.githubusercontent.com/PowerShell/vscode-powershell/main/scripts/Install-VSCode.ps1)
iwr : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet
Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
At line:1 char:6
+ iex (iwr https://raw.githubusercontent.com/PowerShell/vscode-powershe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestComman
d
I added the -UseBasicParsing parameter, and it still fails:
PS C:\Users\WDAGUtilityAccount> iex (iwr https://raw.githubusercontent.com/PowerShell/vscode-powershell/main/scripts/Install-VSCode.ps1 -UseBasicParsing)
Downloading latest Visual Studio Code (64-bit)...
You cannot call a method on a null-valued expression.
At line:556 char:17
+ ... if (-not $PSCmdlet.ShouldProcess("$installerPath $exeArgs", ' ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
However if I download the file and run it, it works fine: (after setting the execution policy to allow it)
PS C:\Users\WDAGUtilityAccount> iwr https://raw.githubusercontent.com/PowerShell/vscode-powershell/main/scripts/Install-VSCode.ps1 -UseBasicParsing -OutFile Install-VSCode.ps1
PS C:\Users\WDAGUtilityAccount> .\Install-VSCode.ps1
Downloading latest Visual Studio Code (64-bit)...
Installing extension ms-vscode.PowerShell...
Installing extensions...
Installing extension 'ms-vscode.powershell'...
(node:1172) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code --trace-deprecation ...` to show where the warning was created)
Extension 'ms-vscode.powershell' v2023.1.0 was successfully installed.
Installation complete!
PS C:\Users\WDAGUtilityAccount>
Visuals
No response
Logs
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.9k
- Forks
- 548
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/vscode-powershell
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
PowerShell/vscode-powershell#5599 · 3 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PowerShell/vscode-powershell#5592 · 2 Kommentare · 1 Reaktion ·
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
PowerShell/vscode-powershell#5583 · 1 Kommentar ·
-
powershell.scriptAnalysis.settingsPath (Description): Warning Message Should Provide A Workaround OffenArea-Code Formatting Issue-Enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
PowerShell/vscode-powershell#4653 · 3 Kommentare · 4 Reaktionen ·
-
nothing OffenIssue-Bug Needs: Triage
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 5/100
PowerShell/vscode-powershell#5603 · 1 Reaktion ·
Alle Issues in PowerShell/vscode-powershell
Ähnliche Issues
-
comp/dashboard P3 type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·