Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ProgressStyle Random - Invalid Operation #8

Closed
5 tasks done
joshua-russell opened this issue Oct 7, 2022 · 1 comment
Closed
5 tasks done

[Bug]: ProgressStyle Random - Invalid Operation #8

joshua-russell opened this issue Oct 7, 2022 · 1 comment
Assignees
Labels
bug Something isn't working triage new issue that needs review

Comments

@joshua-russell
Copy link
Contributor

Describe the problem

Line 219 generates an error:

InvalidOperation
… $host.globalData.progressBackgroundColor = ($progcolors | …
The property 'progressBackgroundColor' cannot be found on this object. Verify that the property exists and can be set.
While I'm not very familiar with how this code works, it seems that $host does not have a globalData - changing this line to $host.privateData seems to fix the issue in PSVersion 5.1 PSEdition Desktop

Note - color doesn't change in PSVersion 7.2.6 PSEdition Core.

Expectation

Countdown to proceed without errors, changing the colors randomly in PowerShell console.

Additional Information

Pull request with suggested change incoming.

PowerShell version

7.2

Platform

Windows 10 Pro or Enterprise

Additional Checks

  • You are using the latest version of this module.
  • You have read this repository's README file.
  • You have read full help and examples for the command you are having problems with.
  • You are running PowerShell in an elevated session.
  • You are running in a traditional PowerShell console or Windows Terminal
@joshua-russell joshua-russell added bug Something isn't working triage new issue that needs review labels Oct 7, 2022
joshua-russell added a commit to joshua-russell/PSTimers that referenced this issue Oct 7, 2022
jdhitsolutions added a commit that referenced this issue Oct 7, 2022
@jdhitsolutions
Copy link
Owner

I haven't used this module in a while, and I can see a number of issues, especially with PowerShell 7. I merged your PR. I'll close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage new issue that needs review
Projects
None yet
Development

No branches or pull requests

2 participants