We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b426613 commit 9bd7a26Copy full SHA for 9bd7a26
hooks/_common.sh
@@ -204,7 +204,7 @@ function common::get_cpu_num {
204
! -f /proc/sys/fs/binfmt_misc/WSLInterop ]]; then # WSL have cfs_quota_us, but WSL should be checked as usual Linux host
205
# Inside K8s pod or DinD in K8s
206
cpu_quota=$(< /sys/fs/cgroup/cpu/cpu.cfs_quota_us)
207
- cpu_period=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us || echo "$cpu_quota")
+ cpu_period=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us 2> /dev/null || echo "$cpu_quota")
208
209
if [[ $cpu_quota -eq -1 || $cpu_period -lt 1 ]]; then
210
# K8s no limits or in DinD
0 commit comments