mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-05-01 14:09:46 -05:00
workflows bugfix empty file with tee
The problem was the cat with the tee (w/o --append) on the same file, the tee command is sometimes faster than the cat command, so it truncates the file content before the cat can read it. The solution was the sed --in-place, so no need to use the cat and tee.
This commit is contained in:
@@ -252,9 +252,8 @@ jobs:
|
||||
|
||||
pgHbaTmpl=$(printf "$pgHbaTmplTmpl" "$DB_PGSQL_DATABASE" "$DB_PGSQL_USERNAME")
|
||||
|
||||
sudo cat "$pgHbaConf" | \
|
||||
sed -E "s/(# +TYPE +DATABASE +USER +ADDRESS +METHOD)/\1$pgHbaTmpl/" | \
|
||||
sudo tee "$pgHbaConf" > /dev/null
|
||||
sudo sed --regexp-extended "s/(# +TYPE +DATABASE +USER +ADDRESS +METHOD)/\1$pgHbaTmpl/" \
|
||||
--in-place "$pgHbaConf"
|
||||
|
||||
pgIdentConf="$pg_config_path/pg_ident.conf"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user