Skip to content

Commit 566f694

Browse files
committed
Use InstallLocation in Scaffolder
1 parent 2e7b6c5 commit 566f694

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Dotnet.Script.Core/Scaffolder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ public void InitializerFolder(string fileName)
2222
string pathToLaunchFile = Path.Combine(vsCodeDirectory, "launch.json");
2323
if (!File.Exists(pathToLaunchFile))
2424
{
25-
string baseDirectory = Path.GetDirectoryName(new Uri(typeof(Scaffolder).GetTypeInfo().Assembly.CodeBase).LocalPath);
26-
string csxPath = Path.Combine(baseDirectory, "dotnet-script.dll").Replace(@"\", "/");
25+
string installLocation = RuntimeHelper.InstallLocation;
26+
string dotnetScriptPath = Path.Combine(installLocation, "dotnet-script.dll").Replace(@"\", "/");
2727

2828
string lauchFileTemplate = TemplateLoader.ReadTemplate("launch.json.template");
2929

30-
string launchFileContent = lauchFileTemplate.Replace("PATH_TO_DOTNET-SCRIPT", csxPath);
30+
string launchFileContent = lauchFileTemplate.Replace("PATH_TO_DOTNET-SCRIPT", dotnetScriptPath);
3131
WriteFile(pathToLaunchFile, launchFileContent);
3232
}
3333

src/Dotnet.Script.DependencyModel/Environment/RuntimeHelper.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public static string GetPathToNuGetStoreFolder()
7979
return storePath;
8080
}
8181

82-
8382
private static string GetProcessArchitecture()
8483
{
8584
return RuntimeEnvironment.RuntimeArchitecture;

0 commit comments

Comments
 (0)