FOLIO-FSE / FOLIO-FSE/FolioClient-PowerShell

Minimum PowerShell Version?

Aperta
#3 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PowerShell
Stelle
0
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The requirements for this module indicate a minimum PowerShell version of 5.1. However, in a 5.1 environment, when running `Get-FolioRecordsByQuery` I get the error:

```
Get-Date : A parameter cannot be found that matches parameter name 'AsUTC'.
At \Modules\FolioClient\0.0.3\FolioClient.psm1:165 char:24
+ if (((Get-Date -AsUTC) -ge $this.TokenExpiry) -or ($force)) {
+ ~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetDateCommand
```

It appears that the -AsUTC parameter didn't exist until version 7.4: https://learn.microsoft.com/en-us/dotnet/api/microsoft.powershell.commands.getdatecommand.asutc?view=powershellsdk-7.6.0

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start in FolioClient.psm1 around line 165, where Get-FolioRecordsByQuery reaches the Get-Date -AsUTC call, and verify the behavior in a PowerShell 5.1 environment. Check how the module documents its minimum version and determine whether the compatibility requirement or the date handling needs to be corrected. Done means the stated support level matches the module's behavior and the command no longer produces this reported error.

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

Valutazione

Stack tecnologico
powershell
Ambito
api
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
58/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.