Skip to content

Commit caf3d43

Browse files
committed
[update] : Return error 2 if operation is none
1 parent 7240562 commit caf3d43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wfa

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,11 @@ check_repo_package() {
450450
check_installed_package() { "${pacman_command}" -Qq "${1}" > /dev/null 2>&1 && return 0 || return 1; }
451451

452452
# この関数に渡されたオペレーションが実行中の場合のみ正常終了します。
453-
check_operation() { [[ "${1}" = "${operation}" ]] && return 0 || return 1; }
453+
check_operation() {
454+
[[ "${operation}" = "none" ]] && return 2
455+
[[ ! "${1}" = "${operation}" ]] && return 1
456+
return 0
457+
}
454458

455459
# ~/.cacheに相当するディレクトリを返します
456460
get_cache_dir() {

0 commit comments

Comments
 (0)