You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to set a server config value, the sed replacement could fail causing the value to not be set.
For example, here I am trying to set a server specific config for the invocation of the java command with the -jar argument pointing to a test jar in my home directory.
The expansion of the $3 (value) variable is breaking the sed replacement pattern because it is using / as the pattern delimiter. The / at the start of the -jar path appears as an additional (unknown) option to the search s/ command.
Here is a simplified sed replacement that uses # instead of / as the pattern delimiter, which allows the "value" to contain slashes.
sed -i "s#$2=.*#$2=$3#g" "${SERVER_CONF[$1]}"
The text was updated successfully, but these errors were encountered:
When trying to set a server config value, the sed replacement could fail causing the value to not be set.
For example, here I am trying to set a server specific config for the invocation of the java command with the -jar argument pointing to a test jar in my home directory.
Here is the current sed line.
msm/init/msm
Line 3201 in 1b93ba8
The expansion of the
$3
(value) variable is breaking the sed replacement pattern because it is using/
as the pattern delimiter. The/
at the start of the -jar path appears as an additional (unknown) option to the searchs/
command.Here is a simplified sed replacement that uses
#
instead of/
as the pattern delimiter, which allows the "value" to contain slashes.sed -i "s#$2=.*#$2=$3#g" "${SERVER_CONF[$1]}"
The text was updated successfully, but these errors were encountered: