Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Commit 3e7a098

Browse files
author
Praburaj
committed
Printing probe locations when unable to find a runtime during kpm pack
Fixes : #803
1 parent 0a8f503 commit 3e7a098

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Microsoft.Framework.PackageManager/Packing/PackManager.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ public bool Package()
103103
{
104104
var frameworkName = DependencyContext.GetFrameworkNameForRuntime(Path.GetFileName(runtime));
105105
var runtimeLocated = TryAddRuntime(root, frameworkName, runtime);
106+
List<string> runtimeProbePaths = null;
106107

107108
if (!runtimeLocated)
108109
{
110+
runtimeProbePaths = new List<string>();
111+
runtimeProbePaths.Add(runtime);
109112
var kreHome = Environment.GetEnvironmentVariable("KRE_HOME");
110113
if (string.IsNullOrEmpty(kreHome))
111114
{
@@ -134,12 +137,18 @@ public bool Package()
134137
runtimeLocated = true;
135138
break;
136139
}
140+
141+
runtimeProbePaths.Add(packagesPath);
137142
}
138143
}
139144

140145
if (!runtimeLocated)
141146
{
142147
_options.Reports.Error.WriteLine(string.Format("Unable to locate runtime '{0}'", runtime.Red().Bold()));
148+
if (runtimeProbePaths != null)
149+
{
150+
_options.Reports.Error.WriteLine(string.Format("Locations probed:{0}{1}", Environment.NewLine, string.Join(Environment.NewLine, runtimeProbePaths)));
151+
}
143152
return false;
144153
}
145154

0 commit comments

Comments
 (0)