-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Expected behavior
After running devon ide update scripts
, I do not only want to have my current IDE installation updated to the latest version (if an update is available) but also have the global scripts ~/.devon/devon
and ~/scripts/devon.bat
updated to the latest version.
Actual behavior
On windows the scripts of the previous release that I did run the devon ide update scripts
on are installed in my home directory.
In case I have a very old instance of devonfw-ide this can cause problems as I then get that very old devon scripts installed globally that could break all my newly updated installations.
Steps to reproduce (bug) / Use Case of feature request (enhancement)
- go to an old installation of devonfw-ide on a Windows machine
- run
devon ide update scripts
- run
devon -v
Related/Dependent Issues
Comments/Hints:
From #1032:
I guess a general problem is that we are obviously running the "old" version of the devon script to trigger the update. On windows this is causing issues with file locks as windows is locking the script while it is running so it cannot replace itself. As a workaround we do that asynchronously. Therefore, we cannot invoke the "fix" synchronously in this case.
The magic spots related to this can be found here:
if [ "${2}" = "${DEVON_IDE_HOME}" ] |
ide/scripts/src/main/resources/scripts/functions
Lines 777 to 779 in 70baf93
if [ "${target}" = "${DEVON_IDE_HOME}/scripts" ] && doIsWindows | |
then | |
(sleep 10;doBackup "${target}" "${3}";doRunCommand "mv '${1}' '${target}'") & |
Affected version:
- IDE: any version up to the latest 2023.08.001
- OS: Windows