Skip to content

Commit

Permalink
fix bug again.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyu49 committed Aug 21, 2023
1 parent be00929 commit 8506815
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon": "images/vcpkg-logo.png",
"publisher": "JackBoosY",
"license": "MIT",
"version": "2.0.1",
"version": "2.0.2",
"engines": {
"vscode": "^1.76.0"
},
Expand Down
9 changes: 6 additions & 3 deletions src/settingsDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class SettingsDocument {
}
tmpName = this.getDependencyName(line);
}
else if (line.search("\"version>=\"") !== -1 && line.search("\"version\"") !== -1)
else if (line.search("\"version>=\"") !== -1 || line.search("\"version\"") !== -1)
{
configs.push({name : tmpName, version: this.getDependencyVersion(line)});
tmpName = "";
Expand All @@ -123,15 +123,18 @@ export class SettingsDocument {
for (let single in configs)
{
let hash = this.verMgr.getPortVersionHash(configs[single].name, configs[single].version);
configsWithVersion.push({name: configs[single].name, version: configs[single].version, hash: hash});
if (hash.length)
{
configsWithVersion.push({name: configs[single].name, version: configs[single].version, hash: hash});
}
}

return configsWithVersion;
}

private currentDependencyName(currentLine: string, configText: string,allConfig: Array<Object>)
{
if (currentLine.search("\"version>=\"") !== -1 && currentLine.search("\"version\"") !== -1 )
if (currentLine.search("\"version>=\"") !== -1 || currentLine.search("\"version\"") !== -1 )
{
let lines = configText.split('\n');
for (let line in lines)
Expand Down

0 comments on commit 8506815

Please sign in to comment.