Skip to content

Commit a04e0b8

Browse files
committed
Double check the symbolic link to diffpy_cmi.pth.
1 parent bd01851 commit a04e0b8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Linux/install

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ install_pthfile() {
362362
print "Symbolic link to ${PTHFILE:t} already exists, good!"
363363
else
364364
print "Creating symbolic link"
365-
ln -siv ${PTHFILE} ${TGTDIR} || exit $?
365+
# On Linux "ln -si" gives zero exit status even if user declines to
366+
# overwrite existing target. Add test if symbolic link indeed works.
367+
ln -siv ${PTHFILE} ${TGTDIR} &&
368+
[[ ${PTHFILE} -ef ${TGTDIR}/${PTHFILE:t} ]] || exit $?
366369
fi
367370
print
368371
}

0 commit comments

Comments
 (0)