Skip to content

Commit

Permalink
Improve existing partition detection in chk_if_the_drv_is_rlly_wiped
Browse files Browse the repository at this point in the history
* Simplify check
* Ensure the check won't fail due to localization

Signed-off-by: 林博仁(Buo-ren, Lin) <[email protected]>
  • Loading branch information
brlin-tw committed Dec 24, 2018
1 parent e46281b commit 9e0aed6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/woeusb
Original file line number Diff line number Diff line change
Expand Up @@ -962,15 +962,15 @@ check_if_the_drive_is_really_wiped(){
'Ensure that %s is really wiped...\n' \
"${target_device}"

if [ \
"$(lsblk \
--pairs \
--output NAME,TYPE \
if [ "$(env LANG=C \
lsblk \
--noheadings \
--output TYPE \
"${target_device}" \
| grep \
--count \
--fixed-strings \
' TYPE="part"'
part
)" -ne 0 ]; then
printf_with_color \
red \
Expand Down

0 comments on commit 9e0aed6

Please sign in to comment.