(dsc): `PSResourceList` manifest migration for deprecated `whatIf` to `set.whatIfArg`

オープン
#2,050 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
powershell
領域
cli, tooling

調査の方向性

Locate psresourcelist.dsc.resource.json, the Repository manifest, and the README. Compare the existing set and what-if commands with the DSC 3.2.0 whatIfArg schema, then validate the -File invocation with stdin input in pwsh. Done means both manifests use the supported schema and exit handling, and the README states the minimum DSC version.

索引モデルが issue の本文から書いたものです。

説明

feature_request Needs-Triage
Summary of the new feature / enhancement

psresourcelist.dsc.resource.json implements what-if through the top-level whatIf manifest operation. DSC deprecated that operation in 3.2.0 in favour of set.whatIfArg, where the engine appends an argument to the normal set command instead of running a separate command. Staying on whatIf means a deprecation warning today and a break when the property is removed.

Current manifest:

"whatIf": {
  "executable": "pwsh",
  "args": [ "-NoLogo", "-NonInteractive", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command",
            "$Input | ./psresourceget.ps1 -resourcetype 'psresourcelist' -operation set -WhatIf; exit $LASTEXITCODE" ],
  "input": "stdin",
  "return": "state"
}
Proposed technical implementation details (optional)
  • Replace the whatIf block with "whatIfArg": "-WhatIf" inside set.
  • whatIfArg is appended after the existing args, which does not work with -Command "...". Switch set to -File ./psresourceget.ps1 -ResourceType psresourcelist -Operation set so the appended -WhatIf binds to the script's [switch]$WhatIf. Verified locally that pwsh -File with stdin input works for this script.
  • Bump $schema on both manifests to a version that includes whatIfArg and set the minimum supported DSC version to 3.2.0 in the README.
  • While in the manifests, the Repository manifest's -Command invocations should also gain ; exit $LASTEXITCODE or move to -File
主要言語
C#
スター
576
フォーク
114
平均マージ
1日 2時間
マージ済み PR(30日)
7

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PowerShell/PSResourceGet のほかの issue

PowerShell/PSResourceGet の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。