Skip to content

Commit be1051f

Browse files
author
pre-commit
committed
pre-commit fixes
1 parent 384091b commit be1051f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hooks/_common.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ function common::get_cpu_num {
209209
local wslinterop_path="/proc/sys/fs/binfmt_misc/WSLInterop"
210210

211211
if [[ -f /sys/fs/cgroup/cpu/cpu.cfs_quota_us &&
212-
( # WSL has cfs_quota_us, but WSL should be checked as usual Linux host
213-
! -f "${wslinterop_path}" &&
214-
! -f "${wslinterop_path}-late"
215-
) ]]; then
212+
(
213+
! -f "${wslinterop_path}" &&
214+
! -f "${wslinterop_path}-late") ]] \
215+
; then # WSL has cfs_quota_us, but WSL should be checked as usual Linux host
216216
# Inside K8s pod or DinD in K8s
217217
cpu_quota=$(< /sys/fs/cgroup/cpu/cpu.cfs_quota_us)
218218
cpu_period=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us 2> /dev/null || echo "$cpu_quota")

0 commit comments

Comments
 (0)