Skip to content

Commit 3ce7e45

Browse files
FatmeFatme
Fatme
authored and
Fatme
committed
Merge pull request #859 from NativeScript/fatme/error-when-adding-eclipse-project
Throw an error when add library command is executed with eclipse project
2 parents 28b95eb + 3e029cc commit 3ce7e45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/services/android-project-service.ts

+4
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
209209

210210
public addLibrary(libraryPath: string): IFuture<void> {
211211
return (() => {
212+
if(this.$fs.exists(path.join(libraryPath, "project.properties")).wait()) {
213+
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.");
214+
}
215+
212216
let name = path.basename(libraryPath);
213217
let targetLibPath = this.getLibraryPath(name);
214218

0 commit comments

Comments
 (0)