KokoroSharp icon indicating copy to clipboard operation
KokoroSharp copied to clipboard

Assign "ESPEAK_DATA_PATH" using indexer instead of .Add()

Open Brolijah opened this issue 7 months ago • 0 comments

Proposed fix for https://github.com/Lyrcaxis/KokoroSharp/issues/58 StartInfo.EnvironmentVariables.Add() can throw if the environment variable already exists. The proposed fix uses the indexer to clobber whatever might be in place and assign the value anyway. Another solution would be to check if the variable already exists using .ContainsKey() then .Remove() it before calling .Add()

Brolijah avatar Apr 27 '26 14:04 Brolijah