Skip to content

Commit

Permalink
fix: support Pipenv develop packages without a version (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Apr 27, 2023
1 parent 6d19b4d commit 8bc880e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/lockfile/fixtures/pipenv/no-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@
"ref": "b36054111bc1e8bbadb5d0d60158feb72926f467"
}
},
"develop": {}
"develop": {
"itsdangerous": {
"editable": true,
"git": "https://github.com/pallets/itsdangerous",
"ref": "de09cad488a4d7c7bbcbcdb8e1c2dfde64325f48"
}
}
}
4 changes: 4 additions & 0 deletions pkg/lockfile/parse-pipenv-lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func ParsePipenvLock(pathToLockfile string) ([]PackageDetails, error) {
}

for name, pipenvPackage := range parsedLockfile.PackagesDev {
if pipenvPackage.Version == "" {
continue
}

version := pipenvPackage.Version[2:]

packages[name+"@"+version] = PackageDetails{
Expand Down

0 comments on commit 8bc880e

Please sign in to comment.