env-alias 0.5.1__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: env-alias
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Powerful helper utility to create shell alias commands to easily set collections of environment variables often with secret values from a variety of data-sources and data-formats.
5
5
  License: BSD-2-Clause
6
6
  Keywords: env-alias,shell,env,alias,bash
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "env-alias"
7
- version = "0.5.1"
7
+ version = "0.5.2"
8
8
  description = "Powerful helper utility to create shell alias commands to easily set collections of environment variables often with secret values from a variety of data-sources and data-formats."
9
9
  authors = ["Nicholas de Jong <contact@nicholasdejong.com>"]
10
10
  license = "BSD-2-Clause"
@@ -6,7 +6,7 @@ from os import getenv
6
6
  from sys import argv
7
7
 
8
8
  __title__ = "Env Alias"
9
- __version__ = "0.5.1"
9
+ __version__ = "0.5.2"
10
10
 
11
11
  LOGGER_LEVEL = "info"
12
12
  if "--debug" in argv or getenv("ENVALIAS_DEBUG", "").lower().startswith(("true", "yes", "enable", "on")):
@@ -39,6 +39,8 @@ class EnvAliasGenerator:
39
39
 
40
40
  if value is not None: # NB: not just "if value" because value could be a valid empty string
41
41
  self.values_generated[definition.name] = value
42
+ os.environ[definition.name] = str(value) # exists at this process and sub-process only
43
+
42
44
  if definition._is_internal_only is True:
43
45
  logger.debug(
44
46
  f"Definition for {definition.name!r} defines a 'null' name for env-alias internal "
@@ -63,9 +63,10 @@ def handle_args(args: List[str]) -> Tuple[str, str]:
63
63
 
64
64
  def usage_help(exit_code: Union[int, None] = None) -> None:
65
65
  print()
66
- print("Usage: env-alias [<alias>] [--debug] <definitions.[yml|yaml]>")
66
+ print(f"{__title__} v{__version__}")
67
67
  print()
68
- print("Docs: https://env-alias.readthedocs.io/en/latest/")
68
+ print("Usage: env-alias [<alias>] [--debug] <definitions.[yml|yaml]>")
69
+ print("Docs: https://env-alias.readthedocs.io")
69
70
  print()
70
71
  if exit_code:
71
72
  exit(exit_code)
File without changes
File without changes