From fd003fa8aa17927a926cd079f0fc53e0546ba1ff Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 10 Jun 2019 22:16:29 +0300 Subject: [PATCH] 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. --- lib/commands/init.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/commands/init.ts b/lib/commands/init.ts index 36984c0dd6..85eb86a785 100644 --- a/lib/commands/init.ts +++ b/lib/commands/init.ts @@ -2,9 +2,11 @@ export class ProjectInitCommand implements ICommand { public allowedParameters: ICommandParameter[] = []; public enableHooks = false; - constructor(private $projectInitService: IProjectInitService) { } + constructor(private $logger: ILogger, + private $projectInitService: IProjectInitService) { } public async execute(args: string[]): Promise { + this.$logger.warn("This command is deprecated and it will be removed in the next major release of NativeScript"); return this.$projectInitService.initialize(); } }