Skip to content

Commit d7b6838

Browse files
authored
Merge pull request #132 from mikrostew/ln-error
Prevent "File exists" errors on reinstall
2 parents 04afadc + 16546b7 commit d7b6838

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dev/unix/install.sh.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ notion_create_binaries() {
7878
notion_unpack_launchbin > "${INSTALL_DIR}"/launchbin
7979
notion_unpack_bash_launcher > "${INSTALL_DIR}"/load.sh
8080

81-
ln -s "${INSTALL_DIR}"/launchscript "${INSTALL_DIR}"/bin/npm
82-
ln -s "${INSTALL_DIR}"/launchscript "${INSTALL_DIR}"/bin/npx
81+
# using -f so that there is no error if the target already exists (for reinstall)
82+
ln -sf "${INSTALL_DIR}"/launchscript "${INSTALL_DIR}"/bin/npm
83+
ln -sf "${INSTALL_DIR}"/launchscript "${INSTALL_DIR}"/bin/npx
8384

8485
chmod 755 "${INSTALL_DIR}/"/notion "${INSTALL_DIR}/bin"/* "${INSTALL_DIR}"/launch*
8586
}

0 commit comments

Comments
 (0)