Merge pull request #1758 from OniriCorpe/OniriCorpe-patch-1

add --after= in the usage section of ynh_read_var_in_file and ynh_write_var_in_file
This commit is contained in:
Alexandre Aubin 2024-01-01 01:02:00 +01:00 committed by GitHub
commit aab80f9ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -611,6 +611,7 @@ ynh_replace_vars() {
# usage: ynh_read_var_in_file --file=PATH --key=KEY
# | arg: -f, --file= - the path to the file
# | arg: -k, --key= - the key to get
# | arg: -a, --after= - the line just before the key (in case of multiple lines with the name of the key in the file)
#
# This helpers match several var affectation use case in several languages
# We don't use jq or equivalent to keep comments and blank space in files
@ -714,6 +715,7 @@ ynh_read_var_in_file() {
# | arg: -f, --file= - the path to the file
# | arg: -k, --key= - the key to set
# | arg: -v, --value= - the value to set
# | arg: -a, --after= - the line just before the key (in case of multiple lines with the name of the key in the file)
#
# Requires YunoHost version 4.3 or higher.
ynh_write_var_in_file() {