Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 09f2008

Browse files
committed
Throw exception if package is not found. This makes it more clear when a config error is made.
On a config error (package name not correct) one gets 'package removed' iso 'package not found'
1 parent 02dfd94 commit 09f2008

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

project/WebDashboard/Plugins/Administration/PackageManager.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ public List<PackageImportEventArgs> InstallPackage(string fileName)
101101
fileName);
102102
FileInfo packageDetails = new FileInfo(packagePath);
103103
List<PackageImportEventArgs> events = null;
104-
if (packageDetails.Exists)
104+
if (!packageDetails.Exists)
105+
{
106+
throw new Exception(string.Format("Wanted package {0} not found in : {1}", fileName, ProgramDataFolder.MapPath("Packages")));
107+
}
108+
else
105109
{
106110
// Load the package and install it
107111
events = new List<PackageImportEventArgs>();

0 commit comments

Comments
 (0)