• Thomas Gambier's avatar
    software/theia: fix symbolic links creation for fonts · 2cc77468
    Thomas Gambier authored
    consider the following command:
    
    ln -sf /XXXX/shared/source-code-pro-fonts/649cbd9ddddf2f6f0ee6dda75160baa1 /YYYY/slappart6/srv/frontend-static/fonts/source-code-pro
    
    When /YYYY/slappart6/srv/frontend-static/fonts/source-code-pro doesn't
    exist, there is no problem, the link is created.
    But when you run the command for the second time, since
    /YYYY/slappart6/srv/frontend-static/fonts/source-code-pro is a
    directory, ln will try to create the link
    /YYYY/slappart6/srv/frontend-static/fonts/source-code-pro/649cbd9ddddf2f6f0ee6dda75160baa1
    which is not possible because
    /YYYY/slappart6/srv/frontend-static/fonts/source-code-pro is already a
    link to a read only directory
    (/XXXX/shared/source-code-pro-fonts/649cbd9ddddf2f6f0ee6dda75160baa1).
    
    Quoting the "man ln":
           -n, --no-dereference
                  treat  LINK_NAME  as a normal file if it is a symbolic link to a
                  directory
    2cc77468