PowerShell / PowerShell/PSResourceGet

Request to change default installation path for user modules

Aperta
#724 6 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature_request
Lingua principale
C#
Stelle
576
Fork
114
Merge medio
1g 2h
PR unite (30g)
7

Descrizione

Summary of the new feature / enhancement

In the latest versions of OneDrive, the Documents folder is synchronized by default. This creates challenges for PowerShell users. Some might not want modules to "roam" between machines. In other cases, an organizational "My" folder always contains two spaces in the name following the pattern "OneDrive - OrgName". The spaces require using an 8.3 folder name or putting the path in quotations, which is extra work.

A community-suggested workaround is to move the default module path. The discussion resolved the best location to be ~/AppData/Local/PowerShell/Modules. The PowerShell committee has discussed and agrees with the approach and acknowledges that multiple steps in a coordinated effort will be required to reach the end goal without breaking compatibility.

https://github.com/PowerShell/PowerShell/issues/15552

Proposed technical implementation details (optional)

Two options for consideration, regarding Install-PSResource:

1 - Add a new parameter -InstallPath and set the default to $Env:HOMEPATH\AppData\Local\PowerShell\Modules.
2 - Just change the path where modules are installed to $Env:HOMEPATH\AppData\Local\PowerShell\Modules, without adding a parameter.

Additional options and considerations are welcome. If this is accepted, PWSH could add the path to PSModulePath (in addition to the existing) in a near-term release.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo la issue di PowerShell #15552 collegata e l’implementazione di Install-PSResource che determina il percorso di installazione predefinito dei moduli. Confronta l’opzione -InstallPath proposta con la modifica diretta del valore predefinito, quindi conferma che l’approccio selezionato preservi la compatibilità e supporti l’aggiornamento pianificato di PSModulePath.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, powershell
Ambito
cli, tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.