Skip to content

Commit 7b9f5c4

Browse files
committed
Merge pull request #63 from NativeScript/fatme/fix-adb-permission
Set execution bit to adb file
2 parents 7fc526b + f1a99e2 commit 7b9f5c4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/commands/post-install.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"use strict";
33
import osenv = require("osenv");
44
import path = require("path");
5+
import util = require("util");
56

67
export class PostInstallCommand implements ICommand {
78
private static CALL_PROFILE_SCRIPT =
@@ -11,11 +12,22 @@ export class PostInstallCommand implements ICommand {
1112

1213
constructor(private $fs: IFileSystem,
1314
private $childProcess: IChildProcess,
14-
private $logger: ILogger) { }
15+
private $logger: ILogger,
16+
private $staticConfig: IStaticConfig) { }
1517

1618
public disableAnalytics = true;
1719

1820
public execute(args: string[]): IFuture<void> {
21+
return (() => {
22+
if(process.platform !== "win32") {
23+
this.$fs.chmod(this.$staticConfig.adbFilePath, 755).wait();
24+
}
25+
26+
this.enableAutoCompletion().wait();
27+
}).future<void>()();
28+
}
29+
30+
private enableAutoCompletion(): IFuture<void> {
1931
return (() => {
2032
var scriptsOk = true;
2133

0 commit comments

Comments
 (0)