vscode-offline 0.1.5__tar.gz → 0.1.6__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 (22) hide show
  1. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/.vscode/extensions.json +2 -1
  2. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/PKG-INFO +1 -1
  3. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/src/vscode_offline/install.py +7 -2
  4. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/.editorconfig +0 -0
  5. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/.github/workflows/publish.yml +0 -0
  6. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/.github/workflows/test.yml +0 -0
  7. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/.gitignore +0 -0
  8. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/.python-version +0 -0
  9. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/.vscode/settings.json +0 -0
  10. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/LICENSE +0 -0
  11. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/README.md +0 -0
  12. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/lefthook.yml +0 -0
  13. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/pyproject.toml +0 -0
  14. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/pyrightconfig.json +0 -0
  15. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/src/vscode_offline/__init__.py +0 -0
  16. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/src/vscode_offline/app.py +0 -0
  17. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/src/vscode_offline/download.py +0 -0
  18. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/src/vscode_offline/loggers.py +0 -0
  19. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/src/vscode_offline/utils.py +0 -0
  20. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/tests/test_install.py +0 -0
  21. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/tests/test_utils.py +0 -0
  22. {vscode_offline-0.1.5 → vscode_offline-0.1.6}/uv.lock +0 -0
@@ -4,6 +4,7 @@
4
4
  "charliermarsh.ruff",
5
5
  "editorconfig.editorconfig",
6
6
  "redhat.vscode-yaml",
7
- "github.vscode-github-actions"
7
+ "github.vscode-github-actions",
8
+ "tamasfe.even-better-toml"
8
9
  ]
9
10
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vscode-offline
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Download and install VS Code Server for offline environments
5
5
  Project-URL: Homepage, https://github.com/fanck0605/vscode-offline
6
6
  Author-email: Chuck Fan <fanck0605@qq.com>
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import os
4
4
  import re
5
+ import shutil
5
6
  import subprocess
6
7
  from collections.abc import Set as AbstractSet
7
8
  from pathlib import Path
@@ -44,11 +45,12 @@ def get_extension_target_platform(filename: str) -> str | None:
44
45
 
45
46
 
46
47
  def install_vscode_extensions(
47
- vscode_bin: str | os.PathLike[str],
48
+ code: str | os.PathLike[str],
48
49
  vsix_dir: str,
49
50
  platform: str,
50
51
  exclude: AbstractSet[str] = frozenset(),
51
52
  ) -> None:
53
+ code_executable = shutil.which(code)
52
54
  for vsix_file in Path(vsix_dir).glob("*.vsix"):
53
55
  extension_identifier = get_extension_identifier(vsix_file.name)
54
56
  if extension_identifier in exclude:
@@ -65,7 +67,10 @@ def install_vscode_extensions(
65
67
  )
66
68
  continue
67
69
  logger.info(f"Installing {vsix_file}")
68
- subprocess.check_call([vscode_bin, "--install-extension", vsix_file, "--force"])
70
+ subprocess.check_call(
71
+ [code, "--install-extension", vsix_file, "--force"],
72
+ executable=code_executable,
73
+ )
69
74
  logger.info(f"Installed {vsix_file}")
70
75
 
71
76
 
File without changes
File without changes
File without changes