Skip to content

Commit

Permalink
Fix the version checking of DEPS file.
Browse files Browse the repository at this point in the history
  • Loading branch information
domchen committed Dec 4, 2023
1 parent 82a4f5c commit 18e302f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "depsync",
"version": "1.3.15",
"version": "1.3.16",
"author": "Dom Chen",
"homepage": "https://github.com/domchen/depsync",
"description": "Automatically synchronize the dependencies of a project by the DEPS configuration file.",
Expand Down
3 changes: 2 additions & 1 deletion src/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ function parse(configFileName, version, platform) {
Utils.error("The DEPS config requires a higher version of depsync tool: " + configFileName);
Utils.error("Requires version: " + config.version);
Utils.error("Current version: " + version);
Utils.error("Please update the depsync tool and try again.");
Utils.error("To upgrade the depsync tool, run:");
Utils.error(" `npm install -g depsync`");
return null;
}
let files = filterByPlatform(data.files, platform);
Expand Down
8 changes: 5 additions & 3 deletions src/Program.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ function makePadding(paddingLength) {


function run(args) {
let version = process.versions.node;
if (Utils.compareVersion(version, "14.14.0") < 0) {
Utils.error("Node.js version must be greater than or equal to 14.14.0\n");
let nodeVersion = process.versions.node;
if (Utils.compareVersion(nodeVersion, "14.14.0") < 0) {
Utils.error("The depsync tool requires Node.js version 14.14.0 or later. ");
Utils.error("Current version: " + nodeVersion);
Utils.error("Please visit https://nodejs.org to download the latest version.");
process.exit(1);
}
let commandOptions = CommandLine.parse(args);
Expand Down

0 comments on commit 18e302f

Please sign in to comment.