Skip to content

Commit a111b78

Browse files
committed
migrate-python-packages: Fix help message
1 parent 3df5689 commit a111b78

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/migrate-python-packages.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ if ($err) {
2828
}
2929

3030
if ($opt.h -or $opt.help) {
31-
$content = Get-Content $PSCommandPath -Raw
31+
# scoop_help removes the '#' character at the start of each line along with the whitespace
32+
# character that follows, but if that whitespace character is a newline because it's just
33+
# an empty line, then that empty line is completely removed.
34+
# To combat that, we add a space to all lines that are just a '#'.
35+
$content = (Get-Content $PSCommandPath -Raw) -replace '(?ms)^#$', '# '
3236
$usage = usage $content
3337
$help = scoop_help $content
3438
return "$usage`n`n$help"

0 commit comments

Comments
 (0)