Skip to content

Commit 5d9c044

Browse files
sspiffwraithgar
authored andcommitted
feat(git): add support for ::subdir in #committish
1 parent cb07a48 commit 5d9c044

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/npa.js

+5
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ Result.prototype.toJSON = function () {
155155
}
156156

157157
function setGitCommittish (res, committish) {
158+
if (committish != null && committish.includes('::')) {
159+
const parts = committish.split('::')
160+
committish = parts[0]
161+
res.gitSubdir = `/${parts[1]}`
162+
}
158163
if (committish != null && committish.length >= 7 && committish.slice(0, 7) === 'semver:') {
159164
res.gitRange = decodeURIComponent(committish.slice(7))
160165
res.gitCommittish = null

0 commit comments

Comments
 (0)