Skip to content

Commit 9614c62

Browse files
committed
Fixed missing comma on path update
1 parent 30acd0f commit 9614c62

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Dotnet.Script.Core/Scaffolder.cs

Lines 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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy