Skip to content

Commit fd003fa

Browse files
fix: show deprecation message on tns init
`tns init` command will be deleted in 6.0.0 release, so we need to show deprecation message when someone uses it.
1 parent 9939141 commit fd003fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/commands/init.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ export class ProjectInitCommand implements ICommand {
22
public allowedParameters: ICommandParameter[] = [];
33
public enableHooks = false;
44

5-
constructor(private $projectInitService: IProjectInitService) { }
5+
constructor(private $logger: ILogger,
6+
private $projectInitService: IProjectInitService) { }
67

78
public async execute(args: string[]): Promise<void> {
9+
this.$logger.warn("This command is deprecated and it will be removed in the next major release of NativeScript");
810
return this.$projectInitService.initialize();
911
}
1012
}

0 commit comments

Comments
 (0)