gitcode-cli 0.14.1__tar.gz → 0.15.0__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.
- {gitcode_cli-0.14.1/gitcode_cli.egg-info → gitcode_cli-0.15.0}/PKG-INFO +10 -10
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/README.md +9 -9
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/__init__.py +1 -1
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/bin/gc-darwin-amd64 +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/bin/gc-darwin-arm64 +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/bin/gc-linux-amd64 +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/bin/gc-linux-arm64 +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/bin/gc-windows-amd64.exe +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/wrapper.py +13 -1
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0/gitcode_cli.egg-info}/PKG-INFO +10 -10
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/pyproject.toml +1 -1
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/tests/test_wrapper.py +44 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/LICENSE +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/MANIFEST.in +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/__main__.py +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gc_cli/bin/.gitkeep +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gitcode_cli.egg-info/SOURCES.txt +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gitcode_cli.egg-info/dependency_links.txt +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gitcode_cli.egg-info/entry_points.txt +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/gitcode_cli.egg-info/top_level.txt +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/setup.cfg +0 -0
- {gitcode_cli-0.14.1 → gitcode_cli-0.15.0}/tests/test_verify_remote_facts.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitcode-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
4
4
|
Summary: GitCode CLI - Command line tool for GitCode
|
|
5
5
|
Author-email: GitCode CLI Contributors <support@gitcode.com>
|
|
6
6
|
Maintainer-email: GitCode CLI Contributors <support@gitcode.com>
|
|
@@ -91,10 +91,10 @@ npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@lat
|
|
|
91
91
|
CI、审计或版本复现可固定版本:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.
|
|
94
|
+
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.15.0 install
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
(scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.
|
|
97
|
+
(scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.15.0 install`)
|
|
98
98
|
|
|
99
99
|
不要使用 `npm i atomgit-cli` 或 `npm install atomgit-cli` 安装全局 CLI;这两条命令只会把包加入当前项目的 `node_modules`,不会更新 PATH 中已有的 `gitcode`。需要由 npm global prefix 管理入口时,可改用:
|
|
100
100
|
|
|
@@ -149,10 +149,10 @@ export PATH="$HOME/.local/bin:$PATH"
|
|
|
149
149
|
|
|
150
150
|
```bash
|
|
151
151
|
# 从 Releases 下载 .deb 包
|
|
152
|
-
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
152
|
+
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc_0.15.0_amd64.deb
|
|
153
153
|
|
|
154
154
|
# 安装
|
|
155
|
-
sudo dpkg -i gc_0.
|
|
155
|
+
sudo dpkg -i gc_0.15.0_amd64.deb
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
@@ -161,10 +161,10 @@ DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
# 从 Releases 下载 .rpm 包
|
|
164
|
-
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
164
|
+
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc-0.15.0-1.x86_64.rpm
|
|
165
165
|
|
|
166
166
|
# 安装
|
|
167
|
-
sudo rpm -i gc-0.
|
|
167
|
+
sudo rpm -i gc-0.15.0-1.x86_64.rpm
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
@@ -180,7 +180,7 @@ source .venv/bin/activate # Linux/macOS
|
|
|
180
180
|
# .\.venv\Scripts\Activate.ps1 # Windows PowerShell
|
|
181
181
|
|
|
182
182
|
# 安装(一行命令)
|
|
183
|
-
pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
183
|
+
pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gitcode_cli-0.15.0-py3-none-any.whl
|
|
184
184
|
|
|
185
185
|
# Windows PowerShell 中推荐使用 gitcode,避免 gc 被内置 Get-Content 别名覆盖
|
|
186
186
|
gitcode version
|
|
@@ -210,7 +210,7 @@ source .venv/bin/activate # Linux/macOS
|
|
|
210
210
|
# .\.venv\Scripts\Activate.ps1 # Windows PowerShell
|
|
211
211
|
|
|
212
212
|
# 固定版本安装,避免 PyPI 尚未同步时安装旧版本
|
|
213
|
-
python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.
|
|
213
|
+
python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.15.0
|
|
214
214
|
|
|
215
215
|
# Windows PowerShell 中推荐使用 gitcode
|
|
216
216
|
gitcode version
|
|
@@ -277,7 +277,7 @@ brew upgrade gc
|
|
|
277
277
|
```
|
|
278
278
|
|
|
279
279
|
shell 补全(bash/zsh/fish)随安装自动配置,无需额外操作。
|
|
280
|
-
Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm
|
|
280
|
+
Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm 旧入口遮蔽。渠道检测会先解析 `gc`/`gitcode` 的软链再匹配 Homebrew 布局(Apple Silicon `/opt/homebrew`、Intel Mac `/usr/local`、Linuxbrew `/home/linuxbrew/.linuxbrew`),bin 目录软链与 Cellar 实路径均可识别。
|
|
281
281
|
|
|
282
282
|
### npm 更新与 PATH 诊断
|
|
283
283
|
|
|
@@ -62,10 +62,10 @@ npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@lat
|
|
|
62
62
|
CI、审计或版本复现可固定版本:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.
|
|
65
|
+
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.15.0 install
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
(scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.
|
|
68
|
+
(scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.15.0 install`)
|
|
69
69
|
|
|
70
70
|
不要使用 `npm i atomgit-cli` 或 `npm install atomgit-cli` 安装全局 CLI;这两条命令只会把包加入当前项目的 `node_modules`,不会更新 PATH 中已有的 `gitcode`。需要由 npm global prefix 管理入口时,可改用:
|
|
71
71
|
|
|
@@ -120,10 +120,10 @@ export PATH="$HOME/.local/bin:$PATH"
|
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
122
|
# 从 Releases 下载 .deb 包
|
|
123
|
-
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
123
|
+
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc_0.15.0_amd64.deb
|
|
124
124
|
|
|
125
125
|
# 安装
|
|
126
|
-
sudo dpkg -i gc_0.
|
|
126
|
+
sudo dpkg -i gc_0.15.0_amd64.deb
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
@@ -132,10 +132,10 @@ DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
134
|
# 从 Releases 下载 .rpm 包
|
|
135
|
-
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
135
|
+
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc-0.15.0-1.x86_64.rpm
|
|
136
136
|
|
|
137
137
|
# 安装
|
|
138
|
-
sudo rpm -i gc-0.
|
|
138
|
+
sudo rpm -i gc-0.15.0-1.x86_64.rpm
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
@@ -151,7 +151,7 @@ source .venv/bin/activate # Linux/macOS
|
|
|
151
151
|
# .\.venv\Scripts\Activate.ps1 # Windows PowerShell
|
|
152
152
|
|
|
153
153
|
# 安装(一行命令)
|
|
154
|
-
pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
154
|
+
pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gitcode_cli-0.15.0-py3-none-any.whl
|
|
155
155
|
|
|
156
156
|
# Windows PowerShell 中推荐使用 gitcode,避免 gc 被内置 Get-Content 别名覆盖
|
|
157
157
|
gitcode version
|
|
@@ -181,7 +181,7 @@ source .venv/bin/activate # Linux/macOS
|
|
|
181
181
|
# .\.venv\Scripts\Activate.ps1 # Windows PowerShell
|
|
182
182
|
|
|
183
183
|
# 固定版本安装,避免 PyPI 尚未同步时安装旧版本
|
|
184
|
-
python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.
|
|
184
|
+
python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.15.0
|
|
185
185
|
|
|
186
186
|
# Windows PowerShell 中推荐使用 gitcode
|
|
187
187
|
gitcode version
|
|
@@ -248,7 +248,7 @@ brew upgrade gc
|
|
|
248
248
|
```
|
|
249
249
|
|
|
250
250
|
shell 补全(bash/zsh/fish)随安装自动配置,无需额外操作。
|
|
251
|
-
Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm
|
|
251
|
+
Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm 旧入口遮蔽。渠道检测会先解析 `gc`/`gitcode` 的软链再匹配 Homebrew 布局(Apple Silicon `/opt/homebrew`、Intel Mac `/usr/local`、Linuxbrew `/home/linuxbrew/.linuxbrew`),bin 目录软链与 Cellar 实路径均可识别。
|
|
252
252
|
|
|
253
253
|
### npm 更新与 PATH 诊断
|
|
254
254
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -77,6 +77,18 @@ def ensure_executable(binary_path: Path) -> None:
|
|
|
77
77
|
binary_path.chmod(0o755)
|
|
78
78
|
|
|
79
79
|
|
|
80
|
+
def detect_distribution() -> str:
|
|
81
|
+
"""Report the installation channel for the distribution env.
|
|
82
|
+
|
|
83
|
+
uv-managed tools run from .../uv/tools/<name>/... venvs; reporting "uv"
|
|
84
|
+
(instead of the blanket "pypi") makes `gc update` suggest
|
|
85
|
+
"uv tool upgrade" rather than running pip inside the uv-managed
|
|
86
|
+
environment — which is exactly what uv tells users not to do.
|
|
87
|
+
"""
|
|
88
|
+
prefix = str(Path(sys.prefix).resolve()).replace("\\", "/").lower()
|
|
89
|
+
return "uv" if "/uv/tools/" in prefix else "pypi"
|
|
90
|
+
|
|
91
|
+
|
|
80
92
|
def main() -> int:
|
|
81
93
|
"""Main entry point for the GitCode CLI command."""
|
|
82
94
|
try:
|
|
@@ -85,7 +97,7 @@ def main() -> int:
|
|
|
85
97
|
ensure_executable(binary_path)
|
|
86
98
|
env = os.environ.copy()
|
|
87
99
|
env.setdefault(COMMAND_NAME_ENV, get_command_name())
|
|
88
|
-
env.setdefault(DISTRIBUTION_ENV,
|
|
100
|
+
env.setdefault(DISTRIBUTION_ENV, detect_distribution())
|
|
89
101
|
env.setdefault(ENTRYPOINT_ENV, str(Path(sys.argv[0]).resolve()))
|
|
90
102
|
env.setdefault(BINARY_ENV, str(binary_path.resolve()))
|
|
91
103
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitcode-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
4
4
|
Summary: GitCode CLI - Command line tool for GitCode
|
|
5
5
|
Author-email: GitCode CLI Contributors <support@gitcode.com>
|
|
6
6
|
Maintainer-email: GitCode CLI Contributors <support@gitcode.com>
|
|
@@ -91,10 +91,10 @@ npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@lat
|
|
|
91
91
|
CI、审计或版本复现可固定版本:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.
|
|
94
|
+
npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.15.0 install
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
(scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.
|
|
97
|
+
(scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.15.0 install`)
|
|
98
98
|
|
|
99
99
|
不要使用 `npm i atomgit-cli` 或 `npm install atomgit-cli` 安装全局 CLI;这两条命令只会把包加入当前项目的 `node_modules`,不会更新 PATH 中已有的 `gitcode`。需要由 npm global prefix 管理入口时,可改用:
|
|
100
100
|
|
|
@@ -149,10 +149,10 @@ export PATH="$HOME/.local/bin:$PATH"
|
|
|
149
149
|
|
|
150
150
|
```bash
|
|
151
151
|
# 从 Releases 下载 .deb 包
|
|
152
|
-
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
152
|
+
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc_0.15.0_amd64.deb
|
|
153
153
|
|
|
154
154
|
# 安装
|
|
155
|
-
sudo dpkg -i gc_0.
|
|
155
|
+
sudo dpkg -i gc_0.15.0_amd64.deb
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
@@ -161,10 +161,10 @@ DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
# 从 Releases 下载 .rpm 包
|
|
164
|
-
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
164
|
+
wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc-0.15.0-1.x86_64.rpm
|
|
165
165
|
|
|
166
166
|
# 安装
|
|
167
|
-
sudo rpm -i gc-0.
|
|
167
|
+
sudo rpm -i gc-0.15.0-1.x86_64.rpm
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
|
|
@@ -180,7 +180,7 @@ source .venv/bin/activate # Linux/macOS
|
|
|
180
180
|
# .\.venv\Scripts\Activate.ps1 # Windows PowerShell
|
|
181
181
|
|
|
182
182
|
# 安装(一行命令)
|
|
183
|
-
pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.
|
|
183
|
+
pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gitcode_cli-0.15.0-py3-none-any.whl
|
|
184
184
|
|
|
185
185
|
# Windows PowerShell 中推荐使用 gitcode,避免 gc 被内置 Get-Content 别名覆盖
|
|
186
186
|
gitcode version
|
|
@@ -210,7 +210,7 @@ source .venv/bin/activate # Linux/macOS
|
|
|
210
210
|
# .\.venv\Scripts\Activate.ps1 # Windows PowerShell
|
|
211
211
|
|
|
212
212
|
# 固定版本安装,避免 PyPI 尚未同步时安装旧版本
|
|
213
|
-
python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.
|
|
213
|
+
python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.15.0
|
|
214
214
|
|
|
215
215
|
# Windows PowerShell 中推荐使用 gitcode
|
|
216
216
|
gitcode version
|
|
@@ -277,7 +277,7 @@ brew upgrade gc
|
|
|
277
277
|
```
|
|
278
278
|
|
|
279
279
|
shell 补全(bash/zsh/fish)随安装自动配置,无需额外操作。
|
|
280
|
-
Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm
|
|
280
|
+
Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm 旧入口遮蔽。渠道检测会先解析 `gc`/`gitcode` 的软链再匹配 Homebrew 布局(Apple Silicon `/opt/homebrew`、Intel Mac `/usr/local`、Linuxbrew `/home/linuxbrew/.linuxbrew`),bin 目录软链与 Cellar 实路径均可识别。
|
|
281
281
|
|
|
282
282
|
### npm 更新与 PATH 诊断
|
|
283
283
|
|
|
@@ -84,3 +84,47 @@ class WrapperTests(unittest.TestCase):
|
|
|
84
84
|
|
|
85
85
|
if __name__ == "__main__":
|
|
86
86
|
unittest.main()
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class DetectDistributionTests(unittest.TestCase):
|
|
90
|
+
def test_uv_tool_venv_reports_uv(self):
|
|
91
|
+
for prefix in (
|
|
92
|
+
"/home/u/.local/share/uv/tools/gitcode-cli",
|
|
93
|
+
"C:\\Users\\u\\AppData\\Roaming\\uv\\tools\\gc",
|
|
94
|
+
"/home/u/UV/Tools/gitcode-cli", # custom UV_TOOL_DIR, upper case
|
|
95
|
+
):
|
|
96
|
+
with mock.patch("sys.prefix", prefix):
|
|
97
|
+
with mock.patch("pathlib.Path.resolve", return_value=Path(prefix)):
|
|
98
|
+
self.assertEqual(wrapper.detect_distribution(), "uv", prefix)
|
|
99
|
+
|
|
100
|
+
def test_ordinary_venv_reports_pypi(self):
|
|
101
|
+
for prefix in ("/usr", "/home/u/venv", "C:\\Users\\u\\venv"):
|
|
102
|
+
with mock.patch("sys.prefix", prefix):
|
|
103
|
+
with mock.patch("pathlib.Path.resolve", return_value=Path(prefix)):
|
|
104
|
+
self.assertEqual(wrapper.detect_distribution(), "pypi", prefix)
|
|
105
|
+
|
|
106
|
+
def test_main_declares_uv_channel_for_uv_tools(self):
|
|
107
|
+
captured = {}
|
|
108
|
+
|
|
109
|
+
def fake_run(argv, **kwargs):
|
|
110
|
+
captured.update(kwargs.get("env") or {})
|
|
111
|
+
return mock.Mock(returncode=0)
|
|
112
|
+
|
|
113
|
+
binary = Path("/tmp/fake-gc")
|
|
114
|
+
with mock.patch("gc_cli.wrapper.get_binary_path", return_value=binary):
|
|
115
|
+
with mock.patch("gc_cli.wrapper.ensure_executable"):
|
|
116
|
+
with mock.patch("subprocess.run", side_effect=fake_run):
|
|
117
|
+
with mock.patch("sys.argv", ["gitcode", "version"]):
|
|
118
|
+
with mock.patch(
|
|
119
|
+
"sys.prefix", "/home/u/.local/share/uv/tools/gitcode-cli"
|
|
120
|
+
):
|
|
121
|
+
with mock.patch(
|
|
122
|
+
"pathlib.Path.resolve", return_value=Path("/home/u/.local/share/uv/tools/gitcode-cli")
|
|
123
|
+
):
|
|
124
|
+
wrapper.main()
|
|
125
|
+
|
|
126
|
+
self.assertEqual(captured.get(wrapper.DISTRIBUTION_ENV), "uv")
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
if __name__ == "__main__":
|
|
130
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|