From 3e029cc9f4c5dbbafa851d6589a39a2c9c25bc5c Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Thu, 3 Sep 2015 13:10:01 +0300 Subject: [PATCH] Throw an error when add library command is executed with eclipse project Fixes https://github.com/NativeScript/nativescript-cli/issues/838 --- lib/services/android-project-service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/services/android-project-service.ts b/lib/services/android-project-service.ts index a2d1b6680c..507480b3f6 100644 --- a/lib/services/android-project-service.ts +++ b/lib/services/android-project-service.ts @@ -217,6 +217,10 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService public addLibrary(libraryPath: string): IFuture { return (() => { + if(this.$fs.exists(path.join(libraryPath, "project.properties")).wait()) { + this.$errors.failWithoutHelp("Unable to add android library. You can use `library add` command only with path to folder containing one or more .jar files."); + } + let name = path.basename(libraryPath); let targetLibPath = this.getLibraryPath(name);