Skip to content

Commit

Permalink
Prioritize existing management canister Candid file (#269)
Browse files Browse the repository at this point in the history
* Prioritize existing management canister Candid file

* 0.15.2
  • Loading branch information
rvanasa committed Feb 14, 2024
1 parent 65e4a60 commit 1d3f8f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-motoko",
"displayName": "Motoko",
"description": "Motoko language support",
"version": "0.15.1",
"version": "0.15.2",
"publisher": "dfinity-foundation",
"repository": "https://github.com/dfinity/vscode-motoko",
"engines": {
Expand Down
9 changes: 5 additions & 4 deletions src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,11 @@ function notifyDfxChange() {
const candidUri = URI.file(candidPath).toString();

// Add management canister Candid file
const icUri = URI.file(
join(candidPath, 'aaaaa-aa.did'),
).toString();
writeVirtual(resolveVirtualPath(icUri), icCandid);
const icPath = join(candidPath, 'aaaaa-aa.did');
if (!existsSync(icPath)) {
const icUri = URI.file(icPath).toString();
writeVirtual(resolveVirtualPath(icUri), icCandid);
}

const idsPath = join(
projectDir,
Expand Down

0 comments on commit 1d3f8f5

Please sign in to comment.