Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix some bugs in weird edge cases #242

Merged
merged 2 commits into from
Dec 18, 2024
Merged
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
14 changes: 10 additions & 4 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 @@ -443,14 +443,14 @@
"adm-zip": "^0.5.10",
"axios": "^1.7.4",
"dotenv": "^16.3.1",
"lzma-native": "^8.0.6",
"node-fetch": "^2.6.7",
"seek-bzip": "^2.0.0",
"semver": "^7.5.2",
"tar-fs": "^2.1.1",
"universal-analytics": "^0.5.3"
},
"optionalDependencies": {
"lzma-native": "^8.0.6",
"usb": "^2.10.0"
}
}
6 changes: 5 additions & 1 deletion src/one-click/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { window, ProgressLocation } from "vscode";
var fetch = require("node-fetch");
var admzip = require("adm-zip");
var tar = require("tar-fs");
var lzma = require("lzma-native");
try {
var lzma = require("lzma-native");
} catch (err) {
lzma = null;
}
import * as fs from "fs";
import * as stream from "stream";
import * as path from "path";
Expand Down
7 changes: 5 additions & 2 deletions src/one-click/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export async function install(context: vscode.ExtensionContext) {

// Does the user's CLI have an update or does the user need to install/update
const cliUpToDate = cliWorking
? semver.gte(currentCliVersion, cliVersion)
? semver.gte(semver.coerce(currentCliVersion) ?? "0.0.0", cliVersion)
: false;
const toolchainUpToDate = toolchainWorking
? semver.gte(currentToolchainVersion, toolchainVersion, { loose: true })
Expand Down Expand Up @@ -651,7 +651,10 @@ export async function configurePaths(
"pros"
)
);
process.env["PROS_VSCODE_FLAGS"] = semver.gte(version, "3.2.4")
process.env["PROS_VSCODE_FLAGS"] = semver.gte(
semver.coerce(version) ?? "0.0.0",
"3.2.4"
)
? "--no-sentry --no-analytics"
: "";
await prosLogger.log(
Expand Down
Loading