From ee1ac164761ea3ebc3c07e6a28ab796cfe9abe14 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Fri, 3 Oct 2014 14:52:02 +0300 Subject: [PATCH] - Accomodate for setups where node's binary is not called 'node' - Fix spelling mistake which prevents post-install actions from runnning at all Fixes https://github.com/NativeScript/nativescript-cli/issues/113 but the change affects Macs too --- lib/commands/post-install.ts | 4 ++-- postinstall.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/commands/post-install.ts b/lib/commands/post-install.ts index 069d6917bb..d1b0dc1fbb 100644 --- a/lib/commands/post-install.ts +++ b/lib/commands/post-install.ts @@ -6,7 +6,7 @@ import util = require("util"); export class PostInstallCommand implements ICommand { - constructor(private $autocompletionService: IAutoCompletionService, + constructor(private $autoCompletionService: IAutoCompletionService, private $fs: IFileSystem, private $staticConfig: IStaticConfig) { } @@ -18,7 +18,7 @@ export class PostInstallCommand implements ICommand { this.$fs.chmod(this.$staticConfig.adbFilePath, "0777").wait(); } - this.$autocompletionService.enableAutoCompletion().wait(); + this.$autoCompletionService.enableAutoCompletion().wait(); }).future()(); } } diff --git a/postinstall.js b/postinstall.js index 96085cd75e..c697f16979 100644 --- a/postinstall.js +++ b/postinstall.js @@ -1,3 +1,4 @@ var child_process = require("child_process"); -child_process.exec('node bin/nativescript.js dev-post-install'); \ No newline at end of file +var command = process.argv[0] + ' bin/nativescript.js dev-post-install'; +child_process.exec(command);