Skip to content

Commit

Permalink
Restore env var
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Jan 4, 2025
1 parent d225b40 commit 20103bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions lib/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,25 @@ def set(cls, state: dict):
for name in configs_to_delete:
del cls.config_data[name]

# socat (API forwarder)
socat_target_addr = state.get('socat_target_addr')
if socat_target_addr:
services['socat'] = _SOCAT
else:
try:
del services['socat']
except KeyError:
pass

# update environment variable (all verified with sanity check)
for key in (
'agentcore_token',
'agent_token',
'agentcore_zone_id',
'socat_target_addr',
):
cls.env_data[key.upper()] = state[key]

cls.write()
asyncio.ensure_future(cls.update())

Expand Down
2 changes: 1 addition & 1 deletion lib/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '1.0.0'
__version__ = '1.0.1'

IS_RELEASE_VERSION = '-' not in __version__

0 comments on commit 20103bd

Please sign in to comment.