while you try to detect if the path is already added using the PATH variable, can you add an additional check to prevent appending to the file if the string is already present?
for example, if export PATH="$PATH:/randompath" is already present in the file, don't try to add it again. even without --force, userpath append --shell bash --home "temphome" /randompath 1>/dev/null 2>&1 will continue appending to the file
while you try to detect if the path is already added using the PATH variable, can you add an additional check to prevent appending to the file if the string is already present?
for example, if
export PATH="$PATH:/randompath"
is already present in the file, don't try to add it again. even without--force
,userpath append --shell bash --home "temphome" /randompath 1>/dev/null 2>&1
will continue appending to the file