Skip to content
Merged

Dev #39

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## version 1.1.2
- 去除多余客户端代码

## version 1.1.1
- 重新写原本的客户端
- 减少许多多余的包引用
Expand Down
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-leetcode-problem-rating",
"displayName": "LeetCode problem rating",
"description": "为LeetCode题目难度进行打分。避免只有简单、中等、困难三种难度",
"version": "1.1.1",
"version": "1.1.2",
"author": "ccagml",
"publisher": "ccagml",
"license": "MIT",
Expand Down
9 changes: 8 additions & 1 deletion src/utils/cpUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ export async function executeCommand(command: string, args: string[], options: c
childProc.on("error", reject);

childProc.on("close", (code: number) => {
if (code !== 0 || result.indexOf("ERROR") > -1) {

var try_result_json;
try {
try_result_json = JSON.parse(result);
} catch (e) {
try_result_json;
}
if (code !== 0 || (try_result_json ? try_result_json.code < 0 : (result.indexOf("ERROR") > -1))) {
const error: IExecError = new Error(`Command "${command} ${args.toString()}" failed with exit code "${code}".`);
if (result) {
error.result = result; // leetcode-cli may print useful content by exit with error code
Expand Down
53 changes: 0 additions & 53 deletions src/vsc-leetcode-cli/lib/cache.js

This file was deleted.

108 changes: 0 additions & 108 deletions src/vsc-leetcode-cli/lib/cli.js

This file was deleted.

84 changes: 0 additions & 84 deletions src/vsc-leetcode-cli/lib/commands/cache.js

This file was deleted.

Loading