Skip to content

Commit 8b23113

Browse files
fix: incorrect paths to CLI resources and files break commands
Some CLI commands are broken due to incorrect paths to resources. - `postinstall` is broken as the path to common helpers is incorrect. Also we are not injecting correct constants and the generation of `.html` for `test init` command fails. Inject correct constants when generating help. - `test init` command is broken as path to CLI's resource dir is not correct
1 parent fd68fbc commit 8b23113

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/common/services/micro-templating-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as util from "util";
22
import * as os from "os";
3-
import * as constants from "../constants";
3+
import * as constants from "../../constants";
44
import { formatListOfNames } from '../helpers';
55

66
export class MicroTemplateService implements IMicroTemplateService {

lib/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class StaticConfig implements IStaticConfig {
4242
public get PROFILE_DIR_NAME(): string {
4343
return ".nativescript-cli";
4444
}
45-
public RESOURCE_DIR_PATH = path.join(__dirname, "../../resources");
45+
public RESOURCE_DIR_PATH = path.join(__dirname, "..", "resources");
4646

4747
constructor(private $injector: IInjector) {
4848
}
@@ -118,7 +118,7 @@ export class StaticConfig implements IStaticConfig {
118118
}
119119

120120
public get HTML_COMMON_HELPERS_DIR(): string {
121-
return path.join(__dirname, "lib", "common", "docs", "helpers");
121+
return path.join(__dirname, "common", "docs", "helpers");
122122
}
123123

124124
private async getAdbFilePathCore(): Promise<string> {

0 commit comments

Comments
 (0)