Change the behavior of fprime-util purge -f when a build folder does not exists.
Rationale
The current fprime-util purge -f command fails if the build directory does not exist.
That leads to situations where the build-fprime-automatic-native-ut directory exists and could be deleted, but since the build-fprime-automatic-native directory does not exists, the command fails and the UT directory is not deleted.
Previous behavior when only the UT folder exists:
fprime-util purge -f
[WARNING] /home/fprime/settings.ini does not exist
[WARNING] /home/fprime/settings.ini does not exist
[WARNING] /home/fprime/settings.ini does not exist
[INFO] Purge build directory at: /home/fprime/build-fprime-automatic-native
[ERROR] [Errno 2] No such file or directory: '/home/fprime/build-fprime-automatic-native'
New behavior when only the UT folder exists:
fprime-util purge -f
[WARNING] /home/fprime/settings.ini does not exist
[WARNING] /home/fprime/settings.ini does not exist
[WARNING] /home/fprime/settings.ini does not exist
[INFO] Purge build directory at: /home/fprime/build-fprime-automatic-native
[WARNING] Skipping purge. The following directory does not exist: /home/fprime/build-fprime-automatic-native
[INFO] Purge build directory at: /home/fprime/build-fprime-automatic-native-ut
Note: I tried to implement it by changing the behavior of the build.load function, using the skip_validation parameter, without success, since it is also set as true in other places for the purge function where the function should not raise an error.
Change Description
Change the behavior of
fprime-util purge -f
when a build folder does not exists.Rationale
The current
fprime-util purge -f
command fails if the build directory does not exist.That leads to situations where the
build-fprime-automatic-native-ut
directory exists and could be deleted, but since thebuild-fprime-automatic-native
directory does not exists, the command fails and the UT directory is not deleted.Previous behavior when only the UT folder exists:
New behavior when only the UT folder exists:
Note: I tried to implement it by changing the behavior of the
build.load
function, using theskip_validation
parameter, without success, since it is also set astrue
in other places for the purge function where the function should not raise an error.