fix(extract): safely remove extract directory
The previous code would remove the extract directory if the command failed. This could be bad because we're not checking if the extract directory already existed (since we're using `mkdir -p`), so it could be possible that the extract operation failed, and we'd be removing a directory that already existed and had files in it. This change only removes the directory if there are no files in it, regardless of whether the extract operation was successful or not. This is much safer.
Loading
Please register or sign in to comment