Skip to content

fix: update Miniconda download method and add error handling - #17

Open
LummiGhost wants to merge 1 commit into
yuyuyzl:mainfrom
LummiGhost:fix/download-miniconda
Open

fix: update Miniconda download method and add error handling#17
LummiGhost wants to merge 1 commit into
yuyuyzl:mainfrom
LummiGhost:fix/download-miniconda

Conversation

@LummiGhost

Copy link
Copy Markdown

use iwr ( Invoke-WebRequest ) instead of Net.WebClient. Fix 403 error.

         powershell -Command "(New-Object Net.WebClient).DownloadFile('https://repo.anaconda.com/miniconda/Miniconda3-py310_24.9.2-0-Windows-x86_64.exe', '.\envs\miniconda3.exe')"                                  
╰─❯                                                                                            
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (403) Forbidd
en."
At line:1 char:1
+ (New-Object Net.WebClient).DownloadFile('https://repo.anaconda.com/mi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Copilot AI review requested due to automatic review settings November 30, 2025 10:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a 403 Forbidden error encountered when downloading Miniconda by replacing the deprecated Net.WebClient method with PowerShell's Invoke-WebRequest (iwr) command. It also adds error handling to verify successful download before proceeding with installation.

Key Changes:

  • Replaced Net.WebClient.DownloadFile() with iwr command for downloading Miniconda installer
  • Added validation to check if the installer file exists after download, with proper error messaging and exit handling
  • Updated .gitignore to exclude envs.back/ directory

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

File Description
ezvtuber-rt Updated subproject commit reference
.gitignore Added envs.back/ to ignored directories
Replaced download method and added error handling for Miniconda installation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LummiGhost

Copy link
Copy Markdown
Author

WTF, 我不是撤掉了第二个提交吗?

@LummiGhost
LummiGhost force-pushed the fix/download-miniconda branch from a8767a4 to 3a25bb0 Compare November 30, 2025 10:50
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

Successfully merging this pull request may close these issues.

2 participants