Skip to content

Commit 8187649

Browse files
committed
Merge pull request #2948 from Lauszus/LibraryDebug
Library debug
2 parents 7032fcf + 26ae4d1 commit 8187649

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,17 @@ public void updateIndex() throws Exception {
9797
rescanLibraryIndex(progress);
9898
}
9999

100-
public void install(ContributedLibrary lib, ContributedLibrary replacedLib) throws Exception {
100+
public void install(ContributedLibrary lib, ContributedLibrary replacedLib) {
101101
if (lib.isInstalled()) {
102-
throw new Exception(_("Library is already installed!"));
102+
System.out.println(_("Library is already installed: \"" + lib.getName() + "\""));
103+
return;
103104
}
104105

105106
final MultiStepProgress progress = new MultiStepProgress(3);
106107

107108
// Step 1: Download library
108109
try {
109-
downloader.download(lib, progress, _("Downloading library."));
110+
downloader.download(lib, progress, _("Downloading library: \"" + lib.getName() + "\""));
110111
} catch (InterruptedException e) {
111112
// Download interrupted... just exit
112113
return;
@@ -117,7 +118,7 @@ public void install(ContributedLibrary lib, ContributedLibrary replacedLib) thro
117118
// all the temporary folders and abort installation.
118119

119120
// Step 2: Unpack library on the correct location
120-
progress.setStatus(_("Installing library..."));
121+
progress.setStatus(_("Installing library: \"" + lib.getName() + "\""));
121122
onProgress(progress);
122123
File libsFolder = indexer.getSketchbookLibrariesFolder();
123124
File tmpFolder = FileUtils.createTempFolderIn(libsFolder);
@@ -148,7 +149,7 @@ public void remove(ContributedLibrary lib) throws IOException {
148149
final MultiStepProgress progress = new MultiStepProgress(2);
149150

150151
// Step 1: Remove library
151-
progress.setStatus(_("Removing library..."));
152+
progress.setStatus(_("Removing library: \"" + lib.getName() + "\""));
152153
onProgress(progress);
153154
FileUtils.recursiveDelete(lib.getInstalledFolder());
154155
progress.stepDone();

0 commit comments

Comments
 (0)