Skip to content

Commit bbffac1

Browse files
committed
nit
1 parent 02d95bf commit bbffac1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

parser/codeblocks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func BuildExecutableScriptWithOptions(blocks []CodeBlock, opts types.DocciOpts)
366366

367367
// Close the guard clause if needed
368368
if block.IfFileNotExists != "" {
369-
script.WriteString(fileExistenceGuardEndTemplate)
369+
script.WriteString("fi\n")
370370
}
371371

372372
// Add delay after block if specified

parser/script_templates.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const (
55
// Main script template with cleanup trap
66
scriptCleanupTemplate = `# Cleanup function for background processes
77
cleanup_background_processes() {
8-
{{DEBUG_CLEANUP}} jobs -p | xargs -r kill 2>/dev/null
8+
{{DEBUG_CLEANUP}} jobs -p | xargs -r kill 2>/dev/null
99
}
1010
trap cleanup_background_processes EXIT
1111
@@ -85,9 +85,6 @@ fi
8585
if [ ! -f "{{FILE}}" ]; then
8686
`
8787

88-
fileExistenceGuardEndTemplate = `fi
89-
`
90-
9188
// Code execution with per-command delay template
9289
codeExecutionTemplate = `# Enable per-command delay ({{DELAY}} seconds) and command display
9390
set {{BASH_FLAGS}}

0 commit comments

Comments
 (0)