Input parameters that are missing, no mechanism for handling
abnormal input, for now, if user type `.\CollectSystemInfo.ps1 -?
(-help, --help)` or `.\CollectSystemInfo.ps1 noniput` , script
always runs without any warning output to the users.
It's not what we expected.
Solves: https://issues.redhat.com/browse/RHEL-50330
Signed-off-by: Dehan Meng <[email protected]>
If user operate 'ctrl+c' or exit powershell to break the
script-running, the Collecting_Status.txt would be opened and
cause the folder couldn't be removed/cleaned.
Solves: https://issues.redhat.com/browse/RHEL-50169
Signed-off-by: Dehan Meng <[email protected]>
Add an interruption handler. When the script is not finished
running, the generated file name could be marked with the
ongoing process, such as Collecting_Status.txt. and it would
be delete after completion. In this way, when the script is
waiting to be interrupted, it will be clearer to the user
which directory was interrupted.
Solves: https://issues.redhat.com/browse/RHEL-50169
Signed-off-by: Dehan Meng <[email protected]>