torizon-templates-utils 0.0.6__tar.gz → 0.0.8__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.
Files changed (18) hide show
  1. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/PKG-INFO +1 -1
  2. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/pyproject.toml +1 -1
  3. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/network.py +1 -1
  4. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/tasks.py +8 -4
  5. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils.egg-info/PKG-INFO +1 -1
  6. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/LICENSE +0 -0
  7. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/README.md +0 -0
  8. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/setup.cfg +0 -0
  9. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/__init__.py +0 -0
  10. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/animations.py +0 -0
  11. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/args.py +0 -0
  12. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/colors.py +0 -0
  13. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/debug.py +0 -0
  14. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils/errors.py +0 -0
  15. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils.egg-info/SOURCES.txt +0 -0
  16. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils.egg-info/dependency_links.txt +0 -0
  17. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils.egg-info/requires.txt +0 -0
  18. {torizon_templates_utils-0.0.6 → torizon_templates_utils-0.0.8}/torizon_templates_utils.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: torizon_templates_utils
3
- Version: 0.0.6
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,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "torizon_templates_utils"
7
- version = "0.0.6"
7
+ version = "0.0.8"
8
8
  authors = [
9
9
  { name="Matheus Castello", email="matheus.castello@toradex.com" },
10
10
  ]
@@ -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
@@ -786,8 +786,8 @@ class TaskRunner:
786
786
  exp_value_str = " ".join(expvalue)
787
787
 
788
788
  if self.__debug:
789
- print(f"Env: {env}={_env_value}")
790
- print(f"Parsed Env: {env}={exp_value_str}")
789
+ print(f"Env: {env}={_env_value}", color=Color.YELLOW)
790
+ print(f"Parsed Env: {env}={exp_value_str}", color=Color.YELLOW)
791
791
 
792
792
  return exp_value_str
793
793
 
@@ -873,6 +873,7 @@ class TaskRunner:
873
873
  _args = self.__check_input(_args)
874
874
  _args = self.__check_vscode_env(_args)
875
875
  _args = self.__check_config(_args)
876
+ _args = self.__check_workspace_folder(_args)
876
877
  # FIXME: These was in the powershell implementation
877
878
  # but when used on Python it generates weird behavior
878
879
  # _args = self.__check_long_args(_args)
@@ -912,12 +913,16 @@ class TaskRunner:
912
913
  print(f"Parsed Args: {_args}", color=Color.YELLOW)
913
914
  print(f"Parsed Command: {_cmd_join}", color=Color.YELLOW)
914
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
915
919
  _ret = subprocess.run(
916
920
  [_cmd, *_args] if not _shell else _cmd_join,
917
921
  stdout=None,
918
922
  stderr=None,
919
923
  env=os.environ,
920
- shell=_shell
924
+ shell=_shell,
925
+ executable="/bin/bash" if _shell else None
921
926
  )
922
927
 
923
928
  # go back to the last cwd
@@ -926,4 +931,3 @@ class TaskRunner:
926
931
  if _ret.returncode != 0:
927
932
  print(f"> TASK [{label}] exited with error code [{_ret.returncode}] <", color=Color.RED)
928
933
  raise RuntimeError(f"Error running task: {label}")
929
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: torizon_templates_utils
3
- Version: 0.0.6
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