Skip to content

Commit

Permalink
fix: use git+https protocol for repo url (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed May 2, 2024
1 parent 21c9262 commit 2eca24b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/util/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const getRemoteUrl = async (path, remote) => {
try {
const urlStr = await tryGit(path, 'remote', 'get-url', remote)
const { domain, user, project } = hgi.fromUrl(urlStr)
const url = new URL(`https://${domain}`)
const url = new URL(`git+https://${domain}`)
url.pathname = `/${user}/${project}.git`
return url.toString()
} catch {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/npm/template-oss.git"
"url": "git+https://github.com/npm/template-oss.git"
},
"keywords": [
"npm",
Expand Down
2 changes: 1 addition & 1 deletion workspace/test-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/npm/template-oss.git",
"url": "git+https://github.com/npm/template-oss.git",
"directory": "workspace/test-workspace"
},
"keywords": [],
Expand Down

0 comments on commit 2eca24b

Please sign in to comment.