[fix] Config panel nested bind statements

This commit is contained in:
Dante 2022-10-06 10:04:13 +01:00 committed by ljf (zamentur)
parent a1795364b7
commit 0252a6fd53

View file

@ -513,7 +513,7 @@ ynh_read_var_in_file() {
# Get the line number after which we search for the variable
local line_number=1
if [[ -n "$after" ]]; then
line_number=$(grep -n $after $file | cut -d: -f1)
line_number=$(grep -m1 -n $after $file | cut -d: -f1)
if [[ -z "$line_number" ]]; then
set -o xtrace # set -x
return 1
@ -591,7 +591,7 @@ ynh_write_var_in_file() {
# Get the line number after which we search for the variable
local line_number=1
if [[ -n "$after" ]]; then
line_number=$(grep -n $after $file | cut -d: -f1)
line_number=$(grep -m1 -n $after $file | cut -d: -f1)
if [[ -z "$line_number" ]]; then
set -o xtrace # set -x
return 1