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 384091b commit be1051fCopy full SHA for be1051f
hooks/_common.sh
@@ -209,10 +209,10 @@ function common::get_cpu_num {
209
local wslinterop_path="/proc/sys/fs/binfmt_misc/WSLInterop"
210
211
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
+ (
+ ! -f "${wslinterop_path}" &&
+ ! -f "${wslinterop_path}-late") ]] \
+ ; then # WSL has cfs_quota_us, but WSL should be checked as usual Linux host
216
# Inside K8s pod or DinD in K8s
217
cpu_quota=$(< /sys/fs/cgroup/cpu/cpu.cfs_quota_us)
218
cpu_period=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us 2> /dev/null || echo "$cpu_quota")
0 commit comments