Custom `psmodulepath` not supported in `Microsoft.Adapter/PowerShell`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Riproduci entrambi gli esempi YAML con dsc config get usando dsc 3.2.0-preview.11, quindi traccia il modo in cui Microsoft.Adapter/PowerShell gestisce la proprietà psmodulepath. Il lavoro è completato quando un percorso di modulo personalizzato viene accettato nella nuova configurazione basata sugli adapter e il comando termina senza l'eccezione relativa alla proprietà mancante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Summary
I was trying out the new Microsoft.Adapter/PowerShell and use the psmodulepath to add custom modules, but it doesn't seem to work. In the old way, it's possible to do something like:
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Custom module
type: Microsoft.DSC/PowerShell
properties:
psmodulepath: C:\CustomModules;<existingModulePaths>
resources:
- name: PowerShell 7 Preview
type: Microsoft.WinGet.DSC/WinGetPackage # Direct resource type
properties:
Id: Microsoft.PowerShell.Preview
Ensure: Present
Then, in the new way, I would expect something like:
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: PowerShell 7 Preview
type: Microsoft.WinGet.DSC/WinGetPackage
metadata:
Microsoft.DSC:
requireAdapter: Microsoft.Adapter/PowerShell
# psmodulepath: C:\CustomModules
properties:
Id: Microsoft.PowerShell.Preview
Ensure: Present
psmodulepath: C:\CustomModules;<existingModulePaths>
But that's going to fail with: Exception: The property 'psmodulepath' cannot be found on this object. Verify that the property exists and can be set.
Steps to reproduce
Run above examples with dsc config get
Expected behavior
Expect to be able to use custom module paths.
Actual behavior
Not able to use custom module path
Error details
Environment data
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
dsc 3.2.0-preview.11
Visuals
No response
- Lingua principale
- Rust
- Stelle
- 526
- Fork
- 76
- Merge medio
- 4g 22h
- PR unite (30g)
- 25
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/DSC
-
Issue-Enhancement Needs Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
PowerShell/DSC#1731 ·
-
Issue-Enhancement Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
PowerShell/DSC#1729 ·
-
Issue-Bug Need-Review
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
PowerShell/DSC#1727 · 4 commenti ·
-
Issue-Enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
PowerShell/DSC#1722 · 3 commenti ·
-
Dev-UX Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PowerShell/DSC#1694 ·
Tutte le issue di PowerShell/DSC
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
todo:ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
taikoxyz/taiko-mono#22168 · 1 commento ·