Skip to content

Commit d3066b2

Browse files
make WSLInterop local var readonly
Co-authored-by: Maksym Vlasov <[email protected]>
1 parent 62953da commit d3066b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hooks/_common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function common::get_cpu_num {
206206

207207
local cpu_quota cpu_period cpu_num
208208

209-
local wslinterop_path="/proc/sys/fs/binfmt_misc/WSLInterop"
209+
local -r wslinterop_path="/proc/sys/fs/binfmt_misc/WSLInterop"
210210

211211
if [[ -f /sys/fs/cgroup/cpu/cpu.cfs_quota_us &&
212212
(! -f "${wslinterop_path}" && ! -f "${wslinterop_path}-late") ]]; then # WSL has cfs_quota_us, but WSL should be checked as usual Linux host

0 commit comments

Comments
 (0)