Skip to content

Commit ad69480

Browse files
authored
Merge pull request #8781 from MrMebelMan/fix_linux_build_symlink_error
Linux build: remove symlinks only if they exist
2 parents 72330aa + 8cff0db commit ad69480

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build/linux/dist/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ xdg_uninstall_f() {
152152

153153
# Remove symlink for arduino
154154
echo "" # Ensure password request message is on new line
155-
if ! rm /usr/local/bin/arduino; then
156-
echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
155+
if [ -f /usr/local/bin/arduino ]; then
156+
rm /usr/local/bin/arduino || echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
157157
fi
158158

159159
}
@@ -189,8 +189,8 @@ simple_uninstall_f() {
189189

190190
# Remove symlink for arduino
191191
echo "" # Ensure password request message is on new line
192-
if ! rm /usr/local/bin/arduino; then
193-
echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
192+
if [ -f /usr/local/bin/arduino ]; then
193+
rm /usr/local/bin/arduino || echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
194194
fi
195195

196196
}

0 commit comments

Comments
 (0)