1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

aliases: Return error on invalid lines

Today, aliases parsing is too lax, silently ignoring most kinds of invalid
lines.

That behaviour can cause a lot of confusion when users think the aliases
are being parsed, and also cause problems when extending the syntax.

This patch fixes that problem by making aliases parsing return errors on
the invalid lines.

Unfortunately this will cause some previously-accepted files to now be
rejected, but it should be quite visible.
This commit is contained in:
Alberto Bertogli
2025-04-05 11:37:23 +01:00
parent 2ee64deec0
commit 0e29fe4ad8
6 changed files with 144 additions and 30 deletions

4
internal/aliases/testdata/empty-hook.sh vendored Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
# Hook that doesn't return any output.
exit 0