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

install.ps1 references $suffix before its defined. #6852

Open
bendemott opened this issue Sep 21, 2024 · 0 comments
Open

install.ps1 references $suffix before its defined. #6852

bendemott opened this issue Sep 21, 2024 · 0 comments

Comments

@bendemott
Copy link

bendemott commented Sep 21, 2024

Environmental Info:
RKE2 Version: master / 1.31

Node(s) CPU architecture, OS, and Version:

Probably ALL

  • Windows Server 2019 Standard Edition
  • Intel x86/64 architecture

Cluster Configuration:

Describe the bug:
If you install rke2 without the Containers feature for windows installed you'll get the following error:

[ERROR] Windows feature: 'Containers' is not installed. Please run: Install-WindowsFeature -Name Containers
Confirm-WindowsFeatures : The variable '$suffix' cannot be retrieved because it has not been set.
At C:\Users\Administrator\install.ps1:670 char:1
+ Confirm-WindowsFeatures -RequiredFeatures @("Containers")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (suffix:String) [Confirm-WindowsFeatures], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined,Confirm-WindowsFeatures

This is because the Powershell script install.ps1 uses the variable $suffix without initializing it here

Steps To Reproduce:

  • Ensure windows feature Container is not present
  • run ./install.ps1

Expected behavior:
Error message should print without powershell InvalidOperation error.

Actual behavior:
powershell InvalidOperation error.

Additional context / logs:
None

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

No branches or pull requests

1 participant