Skip to content

Commit 50b111a

Browse files
chore: set default cli help page to start instead of index
Due to changes in the previous commit, `tns -h` is not working as CLI is trying to open the `index.md` file, which does not exist anymore. Change CLI's code to look for `start.md` instead.
1 parent 6bfa7df commit 50b111a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/common/services/help-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export class HelpService implements IHelpService {
195195
await this.throwMissingCommandError(commandData);
196196
}
197197

198-
return (commandName && commandName.replace(/\|/g, "-")) || "index";
198+
return (commandName && commandName.replace(/\|/g, "-")) || "start";
199199
}
200200

201201
private async throwMissingCommandError(commandData: ICommandData): Promise<void> {

lib/common/test/unit-tests/services/help-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ and another one`
422422
it("shows index help when command is not specified", async () => {
423423
const injector = createTestInjector();
424424
injector.register("fs", {
425-
enumerateFilesInDirectorySync: (path: string) => ["index.md"],
425+
enumerateFilesInDirectorySync: (path: string) => ["start.md"],
426426
readText: () => "index data is read"
427427
});
428428

0 commit comments

Comments
 (0)