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

fix: use double brackets for if clause with and & or concatenation #1418

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

Gitsarry
Copy link
Contributor

Previous if clause does not work with Bash version 5.2.15(1)-release (x86_64-pc-linux-gnu)
for OS="windows" and RELEASE="11"
(leads to missing tpm="on" line in .conf resulting file)

Fixes #1387

Type of change

[x] Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have performed a self-review of my code
  • I have tested my code in common scenarios and confirmed there are no regressions

@Gitsarry Gitsarry changed the title Fix non-working if clause's boolean logic fix: use double brackets for if clause with and & or concatenation Aug 12, 2024
Previous does not work with Bash version 5.2.15(1)-release (x86_64-pc-linux-gnu)
@Gitsarry
Copy link
Contributor Author

Gitsarry commented Aug 16, 2024

Better to read and structured code would be:

# Enable TPM for Windows 11 and Windows Server 2022
local -r l_OS_RELEASE="${OS]-${RELEASE}"
if [[ "${l_OS_RELEASE}" == 'windows-11' || "${l_OS_RELEASE}" == 'windows-server-2022' ]]; then

@flexiondotorg flexiondotorg merged commit 790484c into quickemu-project:master Aug 27, 2024
4 of 5 checks passed
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

Successfully merging this pull request may close these issues.

bug: Windows 10 and 11 default configuration does not include tpm and secure boot settings
2 participants