Skip to content

Commit 5cd1d8c

Browse files
authored
Powershell - Passing arguments that contain quote characters (#57)
* Replicate issue with double quotes * Update pwsh from 7.2.2 to 7.3.6 * Update test assertion
1 parent 7310453 commit 5cd1d8c

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.github/workflows/test-action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
"nuget-version": "1.0.13-alpha",
6363
"auto-generate-release-notes": "Yes",
6464
"push-nuget": "",
65-
"custom-release-notes": "## Custom release notes\n\nTest 123\n\nAnother line:\n- point 1\n- point 2\n- point 3",
65+
"custom-release-notes": "## Custom release notes\n\nTest 123\n\"line with double quotes\"\n\nAnother line:\n- point 1\n- point 2\n- point 3",
6666
"operating-systems": {
6767
"macos": true,
6868
"windows": true,

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
FROM mcr.microsoft.com/dotnet/runtime:7.0-alpine AS base
44
# install powershell as per https://docs.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.2
5+
ARG PWSH_VERSION=7.3.6
56
RUN apk add --no-cache \
67
ca-certificates \
78
less \
@@ -17,7 +18,7 @@ RUN apk add --no-cache \
1718
icu-libs \
1819
curl
1920
RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust
20-
RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.2.2/powershell-7.2.2-linux-alpine-x64.tar.gz -o /tmp/powershell.tar.gz
21+
RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${PWSH_VERSION}/powershell-${PWSH_VERSION}-linux-alpine-x64.tar.gz -o /tmp/powershell.tar.gz
2122
RUN mkdir -p /opt/microsoft/powershell/7
2223
RUN tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7
2324
RUN chmod +x /opt/microsoft/powershell/7/pwsh

GitHubIssueFormsParser/tests/GitHubIssuesParserCli.Tests/CliCommands/ParseIssueFormCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public async Task ParseIssueFormCommandTest1()
2727
issueFormJson.NuGetVersion.ShouldBe("1.0.13-alpha");
2828
issueFormJson.AutoGenerateReleaseNotes.ShouldBe("Yes");
2929
issueFormJson.PushNuget.ShouldBeEmpty();
30-
issueFormJson.CustomReleaseNotes.ShouldBe($"## Custom release notes{Environment.NewLine}{Environment.NewLine}Test 123{Environment.NewLine}{Environment.NewLine}Another line:{Environment.NewLine}- point 1{Environment.NewLine}- point 2{Environment.NewLine}- point 3");
30+
issueFormJson.CustomReleaseNotes.ShouldBe($"## Custom release notes{Environment.NewLine}{Environment.NewLine}Test 123{Environment.NewLine}\"line with double quotes\"{Environment.NewLine}{Environment.NewLine}Another line:{Environment.NewLine}- point 1{Environment.NewLine}- point 2{Environment.NewLine}- point 3");
3131
issueFormJson.OperatingSystems.ShouldNotBeNull();
3232
issueFormJson.OperatingSystems.MacOS.ShouldNotBeNull();
3333
issueFormJson.OperatingSystems.MacOS.ShouldBe(true);

GitHubIssueFormsParser/tests/GitHubIssuesParserCli.Tests/TestFiles/IssueBody.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ _No response_
1919
## Custom release notes
2020

2121
Test 123
22+
"line with double quotes"
2223

2324
Another line:
2425
- point 1

0 commit comments

Comments
 (0)