Skip to content

Commit

Permalink
feat: Allow setting environment variable value directly
Browse files Browse the repository at this point in the history
  • Loading branch information
koplo199 authored and orowith2os committed Aug 29, 2023
1 parent c4e8005 commit 16af9e3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bottles/frontend/windows/envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,18 @@ def __save_var(self, *_args):
return

env_name = self.entry_name.get_text()
env_value = "value"
split_value = env_name.rsplit('=', 1)
if len(split_value) == 2:
env_name = split_value[0]
env_value = split_value[1]
self.manager.update_config(
config=self.config,
key=env_name,
value="value",
value=env_value,
scope="Environment_Variables"
)
_entry = EnvVarEntry(parent=self, env=[env_name, "value"])
_entry = EnvVarEntry(parent=self, env=[env_name, env_value])
GLib.idle_add(self.group_vars.add, _entry)
self.entry_name.set_text("")

Expand Down

0 comments on commit 16af9e3

Please sign in to comment.