Repository navigation
Conversation
Auto-generated from release 2026.9.19
PR Summary by QodoAdd PowerShell 7.6.6 bundle with enhanced console support
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
| REM Check if we are running in a specialized console that doesn't need re-config | ||
| if defined BEARSAMPP_SHELL goto skip_registry_config |
There was a problem hiding this comment.
5. Nested shell options are ignored 🐞 Bug ≡ Correctness
powershell.bat jumps directly to skip_registry_config when BEARSAMPP_SHELL is inherited, bypassing parse_args as well as registry configuration. Because every launched shell receives that marker, invoking the launcher from an existing Bearsampp shell silently discards --title, --startingDirectory, and exit and uses defaults instead.
Agent Prompt
## Issue description
The inherited shell marker bypasses command-line parsing, so documented options stop working when the launcher is called from a Bearsampp shell.
## Fix Focus Areas
- bin/powershell7.6.6/powershell.bat[32-73]
- bin/powershell7.6.6/powershell.bat[166-167]
## Recommended Fix
Always run argument parsing before branching on `BEARSAMPP_SHELL`. Use the marker only to skip font and registry setup after the requested title, starting directory, and exit behavior have been captured.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| REM Fast font discovery and registration | ||
| REM This script outputs the FONT_NAME to be used | ||
| set "POWERSHELL_SCRIPT=$fontName = '!FONT_NAME!'; if (-not (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts' -Name '*!FONT_NAME!*' -ErrorAction SilentlyContinue)) { $fallbacks = @('CaskaydiaMono NF', 'CaskaydiaCove NF', 'JetBrainsMono NF', 'MesloLGS NF', 'Cascadia Mono NF'); foreach ($f in $fallbacks) { if (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts' -Name '*$f*' -ErrorAction SilentlyContinue) { $fontName = $f; break } } }; if ('!FONTS_SRC!' -ne '' -and (Test-Path '!REGISTER_FONTS_PS1!')) { $captured = & '!REGISTER_FONTS_PS1!' '!FONTS_SRC!' '!FONTS_DEST!'; if ($captured -and $captured -notmatch 'WARNING:|ERROR:') { $fontName = $captured } }; $fontName" |
There was a problem hiding this comment.
6. Apostrophes disable font installation 🐞 Bug ≡ Correctness
POWERSHELL_SCRIPT embeds the font source, registration script, and destination paths directly inside single-quoted PowerShell literals without escaping apostrophes. Installing the bundle beneath a directory such as C:\User's\Bearsampp produces malformed command syntax before register-fonts.ps1 can run.
Agent Prompt
## Issue description
Font registration constructs PowerShell source from unescaped filesystem paths, so apostrophes in an installation path break the command.
## Fix Focus Areas
- bin/powershell7.6.6/powershell.bat[79-93]
## Recommended Fix
Do not interpolate filesystem paths into a `-Command` string. Invoke `register-fonts.ps1` with `-File` and separately quoted arguments, or encode the command and pass paths through environment variables that PowerShell reads as data.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| oh_my_posh = https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-windows-amd64.exe | ||
| oh_my_posh_theme = https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/paradox.omp.json |
There was a problem hiding this comment.
4. Release rebuilds ship changing code 🐞 Bug ⛨ Security
deps.properties obtains the Oh My Posh executable from a latest URL, and the build accepts the download after checking only that a file exists. Rebuilding the same 7.6.6 release after the upstream asset changes packages different unverified executable code, which the profile runs at every shell startup.
Agent Prompt
## Issue description
The release packages mutable executable and module downloads without validating expected cryptographic hashes.
## Fix Focus Areas
- bin/powershell7.6.6/deps.properties[1-16]
- build.gradle[653-693]
- build.gradle[889-957]
- bin/powershell7.6.6/config/Microsoft.PowerShell_profile.ps1[18-24]
## Recommended Fix
Replace `latest` and unversioned package endpoints with immutable version URLs, record a trusted SHA-256 digest for every dependency, and make the build reject any mismatch before packaging. Keep dependency versions and hashes tied to the 7.6.6 bundle metadata.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
… settings Removed unnecessary registry writes to HKCU\Console and HKCU\Console\<CommonTitles> that were setting default console properties globally. The launcher now only configures registry settings for the specific window title being launched, reducing registry operations and potential conflicts with other console applications while maintaining proper font and UTF-8 support for Bearsampp PowerShell windows.
…ad of delayed expansion This change simplifies the batch script by removing EnableDelayedExpansion and converting all delayed expansion syntax (!var!) to standard expansion (%var%). This improves compatibility and reduces complexity while maintaining all functionality including font configuration, registry settings, and UTF-8 support.
… handling - Change font registration invocation from dot-sourcing to -File parameter for proper script execution - Add comprehensive error handling with exit codes for font installation failures - Improve AddFontResourceEx error detection by checking return value - Add error handling for TrueType font registry operations - Use -LiteralPath for safer file copy operations - Move GDI32 type definition outside loop for better performance - Exit with error code 1 when font installation or registration fails
No description provided.