Closed ViktorHofer closed 5 years ago
Fixing another bug with powershell:
2019-02-14 02:54:24 FTL The given key 'Powershell' was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Codecov.Upload.Uploads.SetUploaders(IUrl url, IReport report, IDictionary
2 terminals)
at Codecov.Upload.Uploads.<>c__DisplayClass1_0.<.ctor>b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at Codecov.Upload.Uploads.get_Uploaders() at Codecov.Upload.Uploads.Uploader() at Codecov.Program.UploadFacade.Uploader() at Codecov.Program.Run.Uploader() at Codecov.Program.Run.Runner(IEnumerable
1 args)
Thanks @ViktorHofer !
If a terminal is not available the following exception is thrown as a collection is modified in a foreach statement.
Guidance
Exception
2019-02-14 02:01:00 WRN No CI detected. 2019-02-14 02:01:01 FTL Collection was modified; enumeration operation may not execute. at System.Collections.Generic.Dictionary
2.KeyCollection.Enumerator.MoveNext() at Codecov.Factories.TerminalFactory.Create() at Codecov.Program.UploadFacade.get_VersionControlSystem() at Codecov.Program.UploadFacade.Uploader() at Codecov.Program.Run.Runner(IEnumerable
1 args)Fix
Iterating on a temporary array instead of the collection directly.