Skip to content

Commit

Permalink
Diminish the notion of prelude #84
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Dec 8, 2021
1 parent 29fb0da commit 0b364ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ function getMyDir(makesurefilePath) {
}

function handleCodeLine(line) {
if (isPrelude() && line !~ /^#/ && trim(line) != "" && !ShellInPreludeErrorShown++)
if (isPrelude() && line !~ /^\s*#/ && trim(line) != "" && !ShellInPreludeErrorShown++)
addError("Shell code is not allowed in prelude area")
else
addCodeLine(line)
Expand Down
2 changes: 2 additions & 0 deletions tests/9_prelude.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# no code allowed in prelude,
# only comments, @define, @shell, @options

# comment with whitespaces before it

@shell bash
@define A=B

Expand Down

0 comments on commit 0b364ce

Please sign in to comment.