Added logic to handle extraneous double-quotes around value for --msbuild-parameters that could be passed in .NET argument for certain execution environments. #360
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-parameters
that could be passed in .NET argument for certain execution environments.Customer is invoking
dotnet lambda
tooling via JavaScript running usingexec.exec()
fromactions/github-script@v6
package in a GitHub action. For this environment, somehow value for--msbuild-parameters
enclosed 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):
MSBuildParameters
used for storing parameters that start with/p:
based on logic here.--msbuild-parameters
switch (e.g., refer code here)."
before we appendCommandOptions.MSBuildParameters
.msbuild
command in a separateProcess
. This command would always fail if we don't handle this issue (assuming compatible parameter formsbuild
command is used. We do have a fallback mechanism to inspect.csproj
project file though.--msbuild-parameters
value start and end with a double-quote.--msbuild-parameters
is 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.