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

Abierto
#2,050 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
powershell
Área
cli, tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
C#
Estrellas
576
Forks
114
Merge medio
1 d 2 h
PR fusionados (30 d)
7

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/PSResourceGet

Todos los issues de PowerShell/PSResourceGet

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.