Skip to content

Commit d0a9c8f

Browse files
committed
ctbcap: improve cut time validation handling
1 parent e1dd28d commit d0a9c8f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ctbcap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ genesis_juicer() {
202202

203203
[ "${CUT_TIME}" = 0 ] && CUT_TIME="" || {
204204
local _CUT_TIME="$(echo "${CUT_TIME}" | head -n 1 | grep -oE '^[0-9]+$')"
205-
local _CUT_TIME="$(printf %d "${_CUT_TIME}" 2>/dev/null)"
206-
[ "${_CUT_TIME}" = 0 ] && {
205+
printf %d "${_CUT_TIME}" >/dev/null 2>&1 || {
207206
echo "(ERROR) Cut Time Must be Some INT Number! [${CUT_TIME}]" >&2
208207
return 1
209208
}

0 commit comments

Comments
 (0)