mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-17 15:38:00 +00:00
tests: policy: avoid using caller's variable
Fix unintended use of caller's variable. Use the corresponding function parameter instead. ShellCheck: warning: policy_settings_dir is referenced but not assigned. [SC2154] Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
parent
59a70a2b28
commit
d83b8349a2
@ -258,9 +258,9 @@ add_copy_from_host_to_policy_settings() {
|
|||||||
local -r genpolicy_settings_dir="$1"
|
local -r genpolicy_settings_dir="$1"
|
||||||
|
|
||||||
local exec_command=(test -d /tmp)
|
local exec_command=(test -d /tmp)
|
||||||
add_exec_to_policy_settings "${policy_settings_dir}" "${exec_command[@]}"
|
add_exec_to_policy_settings "${genpolicy_settings_dir}" "${exec_command[@]}"
|
||||||
exec_command=(tar -xmf - -C /tmp)
|
exec_command=(tar -xmf - -C /tmp)
|
||||||
add_exec_to_policy_settings "${policy_settings_dir}" "${exec_command[@]}"
|
add_exec_to_policy_settings "${genpolicy_settings_dir}" "${exec_command[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Change genpolicy settings to allow executing on the Guest VM the commands
|
# Change genpolicy settings to allow executing on the Guest VM the commands
|
||||||
@ -270,7 +270,7 @@ add_copy_from_guest_to_policy_settings() {
|
|||||||
local -r copied_file="$2"
|
local -r copied_file="$2"
|
||||||
|
|
||||||
exec_command=(tar cf - "${copied_file}")
|
exec_command=(tar cf - "${copied_file}")
|
||||||
add_exec_to_policy_settings "${policy_settings_dir}" "${exec_command[@]}"
|
add_exec_to_policy_settings "${genpolicy_settings_dir}" "${exec_command[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
hard_coded_policy_tests_enabled() {
|
hard_coded_policy_tests_enabled() {
|
||||||
|
Loading…
Reference in New Issue
Block a user