Skip to content

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

Open
Brolijah wants to merge 1 commit into
Lyrcaxis:mainfrom
Brolijah:main
Open

Assign "ESPEAK_DATA_PATH" using indexer instead of .Add()#59
Brolijah wants to merge 1 commit into
Lyrcaxis:mainfrom
Brolijah:main

Conversation

@Brolijah
Copy link
Copy Markdown

@Brolijah Brolijah commented Apr 27, 2026

Proposed fix for #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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant