Skip to content

Commit 6d48ce3

Browse files
committed
fix: write file sync
1 parent 452f0e8 commit 6d48ce3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

keylogger-mvp/extension.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,7 @@ function runTest() {
176176
pathOfPy.replace(/\//g, "\\")
177177
const fs = require("fs");
178178
let json = JSON.stringify({ problem: __problem });
179-
fs.writeFile(`${pathOfPy}/prob.json`, json, (err) => {
180-
if (err) {
181-
console.log(err);
182-
}
179+
fs.writeFileSync(`${pathOfPy}/prob.json`, json)
183180
let uri = decodeURIComponent(vscode.window.activeTextEditor.document.uri.toString())
184181
.toString()
185182
.substring(7);
@@ -206,7 +203,6 @@ function runTest() {
206203
survey();
207204
}
208205
}
209-
updateStatus();
210206
}
211207
);
212208
} else if (language.toLowerCase() === "coq") {
@@ -220,7 +216,7 @@ function runTest() {
220216
} else current = 1;
221217
});
222218
}
223-
});
219+
updateStatus();
224220
}
225221
}
226222

0 commit comments

Comments
 (0)