Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9614c62

Browse filesBrowse files
committed
Fixed missing comma on path update
1 parent 30acd0f commit 9614c62
Copy full SHA for 9614c62

File tree

2 files changed

+2
-3
lines changed
Filter options

2 files changed

+2
-3
lines changed

‎src/Dotnet.Script.Core/Scaffolder.cs

Copy file name to clipboardExpand all lines: src/Dotnet.Script.Core/Scaffolder.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private void CreateLaunchConfiguration(string currentWorkingDirectory)
174174
}
175175
else
176176
{
177-
string pattern = @"^(\s*"")(.*dotnet-script.dll)("").*$";
177+
string pattern = @"^(\s*"")(.*dotnet-script.dll)(""\s*,).*$";
178178
if (Regex.IsMatch(launchFileContent, pattern, RegexOptions.Multiline))
179179
{
180180
var newLaunchFileContent = Regex.Replace(launchFileContent, pattern, $"$1{dotnetScriptPath}$3", RegexOptions.Multiline);

‎src/Dotnet.Script.Tests/ScaffoldingTests.cs

Copy file name to clipboardExpand all lines: src/Dotnet.Script.Tests/ScaffoldingTests.cs
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System;
66
using System.IO;
77
using System.Reflection;
8-
using System.Text.RegularExpressions;
98
using Xunit;
109
using Xunit.Abstractions;
1110

@@ -172,7 +171,7 @@ public void ShouldUpdatePathToDotnetScript()
172171
var pathToLaunchConfiguration = Path.Combine(scriptFolder.Path, ".vscode/launch.json");
173172
var config = JObject.Parse(File.ReadAllText(pathToLaunchConfiguration));
174173

175-
config.SelectToken("configurations[0].args[1]").Replace("InvalidPath/dotnet-script.dll,");
174+
config.SelectToken("configurations[0].args[1]").Replace("InvalidPath/dotnet-script.dll");
176175

177176
File.WriteAllText(pathToLaunchConfiguration, config.ToString());
178177

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.