Skip to content

Commit 38a23a6

Browse files
Burgynclaude
andcommitted
Fix review issues: GetDescription condition typo, toc.yml indent, CompileSection logging
- Fix duplicated HasPreRequestScript condition in GenerateCommand.GetDescription (should check HasPostResponseScript as second operand) - Fix toc.yml indentation from 3-space to 4-space for .tp entry - Use CancellationToken.None instead of new CancellationToken() - Pass LogFile and LogFileLogLevel to CompileSection so .tp compilation respects log-file settings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 19cf21b commit 38a23a6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/docs/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
href: test-case/request-file.md
1313
- name: Post-Response Script
1414
href: test-case/post-response-script.md
15-
- name: Single-File Format (.tp)
16-
href: test-case/tp-file.md
15+
- name: Single-File Format (.tp)
16+
href: test-case/tp-file.md
1717
- name: Collection
1818
href: collection.md
1919
- name: How to Write Tests

src/TeaPie.DotnetTool/CompileScriptCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public override async Task<int> ExecuteAsync(CommandContext context, Settings se
3232

3333
if (!path.IsTpFile())
3434
{
35-
var result = await BuildApplication(settings).Run(new CancellationToken());
35+
var result = await BuildApplication(settings).Run(CancellationToken.None);
3636
InterpretResult(result);
3737
return result;
3838
}
@@ -95,10 +95,10 @@ private async Task<bool> CompileSection(string tpPath, string scriptContent, str
9595
.WithTemporaryPath(string.Empty)
9696
.WithScriptCompilationPipeline(tpPath)
9797
.WithScriptContent(scriptContent)
98-
.WithLogging(logLevel)
98+
.WithLogging(logLevel, settings.LogFile ?? string.Empty, settings.LogFileLogLevel)
9999
.Build();
100100

101-
var result = await app.Run(new CancellationToken());
101+
var result = await app.Run(CancellationToken.None);
102102

103103
if (result == 0)
104104
{

src/TeaPie.DotnetTool/GenerateCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private static void ReportSuccessfullCreation(Settings settings, string path)
127127
private static string GetDescription(Settings settings)
128128
{
129129
var description = string.Empty;
130-
if (settings.HasPreRequestScript || settings.HasPreRequestScript)
130+
if (settings.HasPreRequestScript || settings.HasPostResponseScript)
131131
{
132132
var hasPreReq = "Pre-Request: " + (settings.HasPreRequestScript ? "YES" : "NO");
133133
var hasPostRes = "Post-Response: " + (settings.HasPostResponseScript ? "YES" : "NO");

0 commit comments

Comments
 (0)