• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-cli / 24670853727

20 Apr 2026 02:01PM UTC coverage: 86.193% (-0.02%) from 86.213%
24670853727

push

github

web-flow
fix(execute): ensure correct CLI loading based on version mismatch (#1640)

951 of 1272 branches covered (74.76%)

Branch coverage included in aggregate %.

2 of 4 new or added lines in 1 file covered. (50.0%)

1 existing line in 1 file now uncovered.

5123 of 5775 relevant lines covered (88.71%)

86.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.29
/packages/cli/bin/execute.js
1
#!/usr/bin/env node
2
const fs = require("fs");
10✔
3
const resolve = require("resolve");
10✔
4
const path = require("path");
10✔
5
const { hideBin } = require("yargs/helpers");
10✔
6

7
const args = hideBin(process.argv);
10✔
8

9
//execute -g igniteui-cli in case there is no project installed, else resolve to the local one
10
resolve("igniteui-cli", { basedir: process.cwd() }, function (err, res) {
10✔
11
        let cli;
12
        if (res && res.indexOf(process.cwd()) > -1) {
10!
13
                const localVersion = require(path.join(process.cwd(), "node_modules/igniteui-cli/package.json"))["version"];
10✔
14
                const globalVersion = require(path.join(__dirname, "../package.json"))["version"];
10✔
15
                if (globalVersion !== localVersion) {
10!
NEW
16
                        console.log("Different igniteui-cli global and local version");                        
×
17
                }                
18
                if (args[0] === "ai-config") {
10!
NEW
19
                        cli = require("../lib/cli");
×
20
                } else {
21
                        cli = require(res);
10✔
22
                }
23
        } else {
UNCOV
24
                cli = require("../lib/cli");
×
25
        }
26
        cli.run(args).catch(function (err) {
10✔
27
                console.error("Error: " + (err.message || err));
×
28
                process.exit(1);
×
29
        });
30
});
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc