Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Addif() function#776

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
SteveL-MSFT merged 2 commits intoPowerShell:mainfromSteveL-MSFT:if-function
May 1, 2025
Merged

Conversation

SteveL-MSFT
Copy link
Member

PR Summary

Add theif() function needed for Bicep support

PR Context

Part of#767

Copy link
Member

@andyleejordanandyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Amazing, this now works:

Q:\src\DSC\bin\debug\dsc.exe -l debug config --parameters '{"parameters": {"colorMode": "light"}}' set --file .\demo.json

with this ternary in Bicep:

@allowed(['light', 'dark'])@description('Light or dark color mode')// TODO: Teach DSC how to use Bicep param filesparam colorMode string = 'light'var valueData = colorMode == 'light' ? 1 : 0var keyPathPrefix = 'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion'resource systemUsesLightTheme 'Microsoft.Windows/Registry@2025-04-07' = {    name: 'SystemUsesLightTheme'    properties: {        keyPath: concat(keyPathPrefix, '\\Themes\\Personalize')        valueName: 'SystemUsesLightTheme'        valueData: {          DWord: valueData        }    }}

SteveL-MSFT reacted with thumbs up emoji
@SteveL-MSFTSteveL-MSFT merged commit5a2a744 intoPowerShell:mainMay 1, 2025
4 checks passed
@SteveL-MSFTSteveL-MSFT deleted the if-function branchMay 1, 2025 22:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@andyleejordanandyleejordanandyleejordan approved these changes

@tgauthtgauthAwaiting requested review from tgauth

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@SteveL-MSFT@andyleejordan

[8]ページ先頭

©2009-2025 Movatter.jp