-
Notifications
You must be signed in to change notification settings - Fork 1.1k
escape semicolons when forwarding RestoreSources to MSBuild #5539
escape semicolons when forwarding RestoreSources to MSBuild #5539
Conversation
@cdmihai @piotrpMSFT @livarcocc |
@@ -77,6 +79,11 @@ internal static CommandOption AddVerbosityOption(CommandLineApplication app) | |||
return app.Option("-v|--verbosity", LocalizableStrings.VerbosityOptionDescription, CommandOptionType.SingleValue); | |||
} | |||
|
|||
private static string Escape(string arg) => |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -77,6 +79,11 @@ internal static CommandOption AddVerbosityOption(CommandLineApplication app) | |||
return app.Option("-v|--verbosity", LocalizableStrings.VerbosityOptionDescription, CommandOptionType.SingleValue); | |||
} | |||
|
|||
private static string Escape(string arg) => | |||
(arg.StartsWith("/p:RestoreSources=", StringComparison.OrdinalIgnoreCase)) ? | |||
arg.Replace(";", "%3B") : // <-- this is a workaround for https://github.com/Microsoft/msbuild/issues/1622 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
7d040fb
to
6f6d6c5
Compare
6f6d6c5
to
905db12
Compare
@@ -77,6 +86,37 @@ public void When_help_is_invoked_Then_MSBuild_extra_options_text_is_included_in_ | |||
} | |||
|
|||
[Fact] | |||
public void WhenRestoreSourcesStartsWithUnixPathThenHttpsSourceIsParsedCorrectly() | |||
{ | |||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@dotnet-bot test Fedora23 x64 Debug Build please. |
This change adds a workaround for dotnet/msbuild#1622 into
MSBuildForwardingApp
.