Skip to content

Conversation

@landwehrj
Copy link
Contributor

Fix issue with web check asking for permission to run.

Fix issue with web check asking for permission to run.
@landwehrj landwehrj self-assigned this Jan 20, 2026
@landwehrj landwehrj added the bug Something isn't working label Jan 20, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @landwehrj, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily resolves an interactive permission prompt that could occur during the network connectivity check within the install.ps1 script. By introducing the -UseBasicParsing flag to the Invoke-WebRequest cmdlet, the script can now perform its web check non-interactively. Additionally, the PR includes minor cosmetic adjustments to whitespace and ensures proper end-of-file formatting.

Highlights

  • Web Check Permission Fix: The Invoke-WebRequest command used for network connectivity checks in install.ps1 now includes the -UseBasicParsing parameter. This change addresses an issue where the command might prompt for user permission, particularly in environments with stricter security settings or older PowerShell versions, by forcing a simpler parsing mode.
  • Code Formatting Improvements: Several lines within the install.ps1 script have been cleaned up by removing trailing whitespace, improving code consistency and readability.
  • File End-of-Line Consistency: The install.ps1 script now correctly ends with a newline character, adhering to common file formatting standards.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes an issue with Invoke-WebRequest by adding the -UseBasicParsing flag, which is a good improvement for script robustness. It also includes several cosmetic changes like removing trailing whitespace and adding a newline at the end of the file.

My review includes a few suggestions to improve code consistency and maintainability:

  • Unifying the brace style in an if/else block.
  • Refactoring a hardcoded URL into a constant.
  • Simplifying and unifying the script's exit logic.

These changes will make the script easier to read and maintain in the future. Overall, the main fix is correct and the other changes are positive.

Comment on lines +439 to +440
if ($kernel -match 'microsoft|WSL2')
{

Choose a reason for hiding this comment

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

medium

For consistency with the elseif and else blocks that follow, consider placing the opening brace on the same line as the if statement. This improves readability by maintaining a consistent style throughout the conditional block.

            if ($kernel -match 'microsoft|WSL2') {

# Check network connectivity
try {
$response = Invoke-WebRequest -Uri "https://install.rocketgraph.com" -Method Head
$response = Invoke-WebRequest -Uri "https://install.rocketgraph.com" -Method Head -UseBasicParsing

Choose a reason for hiding this comment

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

medium

The URL https://install.rocketgraph.com is hardcoded. This URL is also used on line 203. To improve maintainability and avoid potential inconsistencies, consider defining this URL as a script-level constant at the beginning of the file, for example: $BaseInstallUrl = 'https://install.rocketgraph.com'. This would make it easier to update in the future.

}

exit $ERROR_CODE No newline at end of file
exit $ERROR_CODE

Choose a reason for hiding this comment

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

medium

The script's exit logic can be simplified and made more consistent. The finally block on lines 699-703 duplicates the pausing logic from the Exit-Script function. Additionally, the script uses exit directly in some places (e.g., line 698) and Exit-Script in others. Consider refactoring to use a single exit mechanism. For example, the main try/catch could be simplified to always call Exit-Script at the end:

try {
    Start-Installation
} catch {
    Write-ErrorLog "Script error: $_"
    $script:ERROR_CODE = 1
}

Exit-Script $script:ERROR_CODE

This would replace lines 696-705, remove the finally block, and ensure consistent exit behavior.

@landwehrj
Copy link
Contributor Author

/gemini Do you see any critical issues?

@gemini-code-assist
Copy link

Hello @landwehrj, I've reviewed the changes in this pull request, and I do not identify any critical issues. The changes primarily address the interactive permission prompt by adding -UseBasicParsing to Invoke-WebRequest, which is a positive fix, along with some minor formatting improvements.

@landwehrj landwehrj merged commit b696b16 into main Jan 20, 2026
5 checks passed
@landwehrj landwehrj deleted the fix-ps1-webcheck branch January 20, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants