Skip to content

Commit 7922096

Browse files
author
Fatme
authored
Merge pull request #4162 from NativeScript/fatme/fix-path-to-package-json
fix: works correctly when `adb` is not added to PATH
2 parents 8040341 + df5628a commit 7922096

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)