@ghyper9023/u2secure 0.3.1 → 0.4.0

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 (2) hide show
  1. package/bin/install.js +6 -1
  2. package/package.json +1 -1
package/bin/install.js CHANGED
@@ -17,7 +17,12 @@ if (!match) {
17
17
  console.error(`Failed to parse owner/repo from repository.url: ${repoUrl}`);
18
18
  process.exit(1);
19
19
  }
20
- const repo = match[1];
20
+ // 修复:去除可能的 .git 后缀
21
+ let repo = match[1];
22
+ if (repo.endsWith('.git')) {
23
+ repo = repo.slice(0, -4);
24
+ }
25
+
21
26
  const tag = `v${version}`;
22
27
 
23
28
  function getPlatformAsset() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghyper9023/u2secure",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Make your Linux system more secure through interactive CLI | 通过交互式的 CLI 让你的 Linux 系统更安全",
5
5
  "bin": {
6
6
  "u2secure": "bin/u2secure-wrapper.js"