Repository navigation
fix: make the Refresh button call Get-StockExchangeData - #3
Open
knightmare2600 wants to merge 1 commit into
Open
knightmare2600 wants to merge 1 commit into
knightmare2600 wants to merge 1 commit into
Conversation
The Refresh button handler tested and invoked $scraperPath, which is never defined - a leftover from before the module restructure, when the scraper was a standalone script. Test-Path $null writes a non-terminating "Value cannot be null" error to the console and returns nothing, so the if-block was skipped: nothing was refreshed and the status bar stayed on "Refreshing exchange data...". Call the module's own Get-StockExchangeData -ForceRefresh instead. As before, the refreshed data is written to the exchange-data cache and the status bar reports the count; the exchange grid itself is not rebuilt (unchanged behaviour). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Refresh button never refreshed anything. It now calls
Get-StockExchangeData -ForceRefresh.The bug
if (Test-Path $scraperPath) { & $scraperPath -ForceRefresh }, but$scraperPathis never defined anywhere in the module. It looks like a leftover from before the module restructure, when the scraper was a standalone script.Test-Path $nulldoes not throw. It writes a non-terminating "Value cannot be null" error to the console and returns nothing, so theifblock was skipped:catchblock never ran.The fix
Get-StockExchangeData -ForceRefreshdirectly.Known, pre-existing
Checks
Lintworkflow already fails onmainbefore this change — PSScriptAnalyzer reports 120 Warning-level findings there (e.g. run 36486962685). This PR adds no new findings (compared by rule, file and message againstmain), so a red Lint check here is the pre-existing state.[Unreleased]. The PRs in this series are independent where possible, so whichever merges second will have a trivial conflict in that section — keep both entries.This is one of a series of small PRs (fixes and features kept separate so you can pick and choose): #2 countdown hours · #3 Refresh button · #4 map preferences · #5 Nasdaq Copenhagen · #6 OMXC25 · #7 FX DKK/SEK · #8 København clock · #9 FTSE 100 · #10 ETF labels.
🤖 Generated with Claude Code