Added logic to handle extraneous double-quotes around value for --msbuild-parameters that could be passed in .NET argument for certain execution environments. #360
+66
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available: #358
Description of changes:
Added logic to handle extraneous double-quotes around value for
--msbuild-parametersthat could be passed in .NET argument for certain execution environments.Customer is invoking
dotnet lambdatooling via JavaScript running usingexec.exec()fromactions/github-script@v6package in a GitHub action. For this environment, somehow value for--msbuild-parametersenclosed in double quotes has leading and trailing double quotes. Did below testing as well:--msbuild-parameters, ignoring other values if any.', it tries to parse only first value beginning with single quote (e.g.'----no-restore).NOTE(s):
MSBuildParametersused for storing parameters that start with/p:based on logic here.--msbuild-parametersswitch (e.g., refer code here)."before we appendCommandOptions.MSBuildParameters.msbuildcommand in a separateProcess. This command would always fail if we don't handle this issue (assuming compatible parameter formsbuildcommand is used. We do have a fallback mechanism to inspect.csprojproject file though.--msbuild-parametersvalue start and end with a double-quote.--msbuild-parametersis currently only supported byAmazon.Lambda.Tools.Amazon.Lambda.Tools.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.