Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update leetCodeExecutor.ts
  • Loading branch information
LNKLEO committed Feb 13, 2020
commit 4066e02aea06cb59bd52d24f3099d2e569d53da2
6 changes: 3 additions & 3 deletions src/leetCodeExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class LeetCodeExecutor implements Disposable {

public async getLeetCodeBinaryPath(): Promise<string> {
if (wsl.useWsl()) {
return `${yield wsl.toWslPath(`"${path.join(yield`"${this.leetCodeRootPath}"`, "bin", "leetcode")}"`)}`;
return `${await wsl.toWslPath(`"${path.join(this.leetCodeRootPath, "bin", "leetcode")}"`)}`;
}
return `"${path.join(yield`"${this.leetCodeRootPath}"`, "bin", "leetcode")}"`;
return `"${path.join(this.leetCodeRootPath, "bin", "leetcode")}"`;
}

public async meetRequirements(): Promise<boolean> {
Expand Down Expand Up @@ -159,7 +159,7 @@ class LeetCodeExecutor implements Disposable {

public async getCompaniesAndTags(): Promise<{ companies: { [key: string]: string[] }, tags: { [key: string]: string[] } }> {
// preprocess the plugin source
const companiesTagsPath: string = path.join(await this.leetCodeRootPath, "lib", "plugins", "company.js");
const companiesTagsPath: string = path.join(this.leetCodeRootPath, "lib", "plugins", "company.js");
const companiesTagsSrc: string = (await fse.readFile(companiesTagsPath, "utf8")).replace(
"module.exports = plugin",
"module.exports = { COMPONIES, TAGS }",
Expand Down