torizon-templates-utils 0.0.7__py3-none-any.whl → 0.0.8__py3-none-any.whl

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.
@@ -5,7 +5,7 @@ import subprocess
5
5
 
6
6
 
7
7
  def get_host_ip():
8
- if 'WSL_DISTRO_NAME' in os.environ:
8
+ if 'WSL_DISTRO_NAME' in os.environ and os.environ['WSL_DISTRO_NAME'] != '':
9
9
  command = ["/mnt/c/Windows/System32/Wbem/WMIC.exe", "NICCONFIG", "WHERE", "IPEnabled=true", "GET", "IPAddress"]
10
10
 
11
11
  # if inside a container we need to run the command in the host
@@ -913,12 +913,16 @@ class TaskRunner:
913
913
  print(f"Parsed Args: {_args}", color=Color.YELLOW)
914
914
  print(f"Parsed Command: {_cmd_join}", color=Color.YELLOW)
915
915
 
916
+ # use bash to execute the VSCode tasks commands and scripts, as they
917
+ # are written and tested in bash. Valid just for commands of shell
918
+ # type, not process type ones
916
919
  _ret = subprocess.run(
917
920
  [_cmd, *_args] if not _shell else _cmd_join,
918
921
  stdout=None,
919
922
  stderr=None,
920
923
  env=os.environ,
921
- shell=_shell
924
+ shell=_shell,
925
+ executable="/bin/bash" if _shell else None
922
926
  )
923
927
 
924
928
  # go back to the last cwd
@@ -927,4 +931,3 @@ class TaskRunner:
927
931
  if _ret.returncode != 0:
928
932
  print(f"> TASK [{label}] exited with error code [{_ret.returncode}] <", color=Color.RED)
929
933
  raise RuntimeError(f"Error running task: {label}")
930
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: torizon_templates_utils
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Package with utilities for Torizon Templates scripts
5
5
  Author-email: Matheus Castello <matheus.castello@toradex.com>
6
6
  Project-URL: Homepage, https://github.com/torizon/vscode-torizon-templates
@@ -4,10 +4,10 @@ torizon_templates_utils/args.py,sha256=nN1b9Ts2lEYbpAGzaMWpAcmcYIrTUFJHehM_UqvnC
4
4
  torizon_templates_utils/colors.py,sha256=Y1FZ0HtKvXfLGYTDclsXubtZCQ-epuch5Dgk1DJdjps,1143
5
5
  torizon_templates_utils/debug.py,sha256=OfdKSdN1kypuJnV_WcPa9bvonjyDvXvA3QTmc1iKyjw,556
6
6
  torizon_templates_utils/errors.py,sha256=rvQjWPkwmOQE56vFywq1yQiiRcl-AL7LRVlpyoYDXvc,1214
7
- torizon_templates_utils/network.py,sha256=-Bj0GEFNf6Zx5hCqTzCpk4HnxuJIvOqS1_P6vrTPowc,1290
8
- torizon_templates_utils/tasks.py,sha256=qBszFzfR1umUWgkZvSB_hrORTS2yuByX__ImMWDtkho,31213
9
- torizon_templates_utils-0.0.7.dist-info/LICENSE,sha256=9sElQO1hY3ElhihFD_PlS5hXMIuSelsJZpIfjNpxBlQ,1099
10
- torizon_templates_utils-0.0.7.dist-info/METADATA,sha256=FFwNtaqD5vjbPBc-SP1wDF51AK0k65V9zzfThdMfDVc,968
11
- torizon_templates_utils-0.0.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
12
- torizon_templates_utils-0.0.7.dist-info/top_level.txt,sha256=qlOkS1ASF5C-kSfpbiWbVHJFgmQ0RN6iunmLArNt6zc,24
13
- torizon_templates_utils-0.0.7.dist-info/RECORD,,
7
+ torizon_templates_utils/network.py,sha256=zAy2NVspy_VItGeyPKCBqhd7rsQV0Jv-vJurUOfcXyI,1330
8
+ torizon_templates_utils/tasks.py,sha256=KyDRDDRjPlg_gJUrsmy_Iu8cFgo7loNaZT8Q25Uixy4,31458
9
+ torizon_templates_utils-0.0.8.dist-info/LICENSE,sha256=9sElQO1hY3ElhihFD_PlS5hXMIuSelsJZpIfjNpxBlQ,1099
10
+ torizon_templates_utils-0.0.8.dist-info/METADATA,sha256=TpPh9mIVfwEG7N9-9GbkCpIHS9yugJy-jV_F7Bf0KiI,968
11
+ torizon_templates_utils-0.0.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
12
+ torizon_templates_utils-0.0.8.dist-info/top_level.txt,sha256=qlOkS1ASF5C-kSfpbiWbVHJFgmQ0RN6iunmLArNt6zc,24
13
+ torizon_templates_utils-0.0.8.dist-info/RECORD,,