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
According to the comment (# Append mounted config to final config), the intention of this code is to append, not overwrite.
Shouldn't it be >> "$userConfFinalPath", not > "$userConfFinalPath"?
EDIT:
I just realized that it is the first code that may create the $userConfFinalPath file, and that it does not overwrite any existing configuration.
Nevertheless, we should use >> rather than > as a convention when we intend to append rather than overwrite.
This is because the code > "$userConfFinalPath" can cause confusing bugs when the code is changed in the future or when a third party clones this repository and changes the code.
The text was updated successfully, but these errors were encountered:
mamekoro
changed the title
entrypoint unexpectedly overwrites final config
Always use >> instead of > when appending to a file
Feb 22, 2024
sftp/files/entrypoint
Lines 37 to 38 in eacf693
According to the comment (
# Append mounted config to final config
), the intention of this code is to append, not overwrite.Shouldn't it be
>> "$userConfFinalPath"
, not> "$userConfFinalPath"
?EDIT:
I just realized that it is the first code that may create the
$userConfFinalPath
file, and that it does not overwrite any existing configuration.Nevertheless, we should use
>>
rather than>
as a convention when we intend to append rather than overwrite.This is because the code
> "$userConfFinalPath"
can cause confusing bugs when the code is changed in the future or when a third party clones this repository and changes the code.The text was updated successfully, but these errors were encountered: