From ada30725622baeb7d6948151ba883ca80cab9ee5 Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Mon, 27 Mar 2023 22:50:15 -0700 Subject: [PATCH 1/2] Pass base args before command --- src/Sentry/buildTransitive/Sentry.targets | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Sentry/buildTransitive/Sentry.targets b/src/Sentry/buildTransitive/Sentry.targets index 995e364e4a..56854db1e5 100644 --- a/src/Sentry/buildTransitive/Sentry.targets +++ b/src/Sentry/buildTransitive/Sentry.targets @@ -47,9 +47,9 @@ The defaults can be set either via config file, or environment variables, per: https://docs.sentry.io/product/cli/configuration/ --> - $(SentryCLIOptions) --api-key $(SentryApiKey) - $(SentryCLIOptions) --auth-token $(SentryAuthToken) - $(SentryCLIOptions) --url $(SentryUrl) + $(SentryCLIBaseOptions) --api-key $(SentryApiKey) + $(SentryCLIBaseOptions) --auth-token $(SentryAuthToken) + $(SentryCLIBaseOptions) --url $(SentryUrl) $(SentryCLIOptions) --org $(SentryOrg) $(SentryCLIOptions) --project $(SentryProject) @@ -86,7 +86,12 @@ - <_SentryCLICommand>"$(SentryCLI)" info + <_SentryCLIBaseCommand>"$(SentryCLI)" + <_SentryCLIBaseCommand Condition="'$(SentryCLIBaseOptions)' != ''">$(_SentryCLIBaseCommand) $(SentryCLIBaseOptions) + + + + <_SentryCLICommand>$(_SentryCLIBaseCommand) info <_SentryCLICommand Condition="'$(SentryOrg)' != '' And '$(SentryProject)' != ''">$(_SentryCLICommand) --no-defaults @@ -123,7 +128,7 @@ Text="Preparing to upload debug symbols and sources to Sentry for $(MSBuildProjectName) ($(Configuration)/$(TargetFramework))" /> - <_SentryCLICommand>"$(SentryCLI)" dif upload + <_SentryCLICommand>$(_SentryCLIBaseCommand) dif upload <_SentryCLICommand Condition="'$(SentryCLIOptions.Trim())' != ''">$(_SentryCLICommand) $(SentryCLIOptions.Trim()) <_SentryCLICommand Condition="'$(SentryUploadSources)' == 'true'">$(_SentryCLICommand) --include-sources <_SentryCLICommand>$(_SentryCLICommand) $(IntermediateOutputPath) @@ -157,12 +162,12 @@ - <_SentryCLICommand>"$(SentryCLI)" dif bundle-sources $(_SentryDebugInfoFile) + <_SentryCLICommand>$(_SentryCLIBaseCommand) dif bundle-sources $(_SentryDebugInfoFile) - <_SentryCLICommand>"$(SentryCLI)" dif upload + <_SentryCLICommand>$(_SentryCLIBaseCommand) dif upload <_SentryCLICommand Condition="'$(SentryCLIOptions.Trim())' != ''">$(_SentryCLICommand) $(SentryCLIOptions.Trim()) <_SentryCLICommand>$(_SentryCLICommand) $(_SentrySourceBundle) From 4cdcba74b38e7cac1b489ea106cb3c1202db9c66 Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Mon, 27 Mar 2023 22:52:17 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c8ff0821..e8a2830d5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Normalize StackFrame in-app resolution for modules & function prefixes ([#2234](https://github.com/getsentry/sentry-dotnet/pull/2234)) - Calling `AddAspNet` more than once should not block all errors from being sent ([#2253](https://github.com/getsentry/sentry-dotnet/pull/2253)) +- Fix Sentry CLI arguments when using custom URL or auth token parameters ([#2259](https://github.com/getsentry/sentry-dotnet/pull/2259)) ### Dependencies