Support PowerShell ErrorActionPreference Continue
- Lingua principale
- C#
- Stelle
- 1.7k
- Fork
- 503
- Merge medio
- 1g 13h
- PR unite (30g)
- 19
Descrizione
## Describe the Feature
ErrorActionPreference Continue results in the last object being returned to the caller.
ErrorActionPreference should work as you would expect if you ran your script outside of lambda. If ErrorActionPreference is set to Continue, the script should continue to execute and return the last object, not the error.
### Is your Feature Request related to a problem?
Module functions that write errors have to be suppressed using ErrorAction SilentlyContinue to prevent lambda from "giving up" on returning the last object.
## Proposed Solution
### Describe alternatives you've considered
## Additional Context
The default ErrorActionPreference in lambda is Continue however lambda is weird and it will hold on to an error and give it to the caller rather than return the last object.
It does not "throw" or "return" the error (i.e. stop execution) as you would expect in reading the documentation. The script will continue to run regardless of the error. If a script has side effects that occur after the error (like Write-S3Object) they will run.
This can mislead developers into thinking their code stopped (since they got some error early on in the script), but in reality the script continued to execute after the error.
### Environment
* [ ] :wave: I may be able to implement this feature request
* [X] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Nell'issue non è indicato alcun file o test. Inizia tracciando il modo in cui il runtime Lambda acquisisce gli errori di PowerShell e determina il valore restituito, quindi confronta questo comportamento con ErrorActionPreference Continue al di fuori di Lambda. Il lavoro è completato quando l'esecuzione continua dopo un errore e l'ultimo oggetto, anziché l'errore, viene restituito al chiamante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, csharp, powershell
- Ambito
- backend, cloud
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100