Skip to content

Commit df5628a

Browse files
committed
fix: works correctly when adb is not added to PATH
{N} CLI tries to use the version from `common/package.json` file when `adb` is not added to PATH. As we deleted `common/package.json` file, the command silently fails and does not return any result.
1 parent e9365e5 commit df5628a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/common/static-config-base.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ export abstract class StaticConfigBase implements Config.IStaticConfig {
9494

9595
// prepare the directory to host our copy of adb
9696
const defaultAdbDirPath = path.join(__dirname, `resources/platform-tools/android/${process.platform}`);
97-
const commonLibVersion = require(path.join(__dirname, "package.json")).version;
97+
const pathToPackageJson = path.join(__dirname, "..", "..", "package.json");
98+
const commonLibVersion = require(pathToPackageJson).version;
9899
const tmpDir = path.join(os.tmpdir(), `telerik-common-lib-${commonLibVersion}`);
99100
$fs.createDirectory(tmpDir);
100101

0 commit comments

Comments
 (0)