File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ process_files_in_directory() {
2626
2727 # Find all .json files in the directory and its subdirectories
2828 find " $directory " -type f -name " *.json" | while read -r file; do
29- replace_words_in_file " $file " virtual_keys virtual_keys_values
29+ replace_words_in_file " $file " virtual_keys[@] virtual_keys_values[@]
3030 echo " Processed file: $file "
3131 done
3232}
@@ -46,7 +46,6 @@ directory="tests/configs"
4646virtual_keys=(" openai-virtual-key" " anyscale-virtual-key" " azure-virtual-key" " cohere-virtual-key" " anthropic-virtual-key" " stability-virtual-key" )
4747virtual_keys_values=(" openai_value" " anyscale_value" " azure_value" " cohere_value" " anthropic_value" " stability_value" )
4848
49-
5049# Check if the directory exists
5150if [[ ! -d " $directory " ]]; then
5251 echo " Directory does not exist. Please provide a valid directory path."
@@ -62,6 +61,5 @@ if [[ "$1" == "--undo" ]]; then
6261 virtual_keys_values=(" ${temp_words[@]} " )
6362fi
6463
65-
66- process_files_in_directory " $directory " virtual_keys virtual_keys_values
64+ process_files_in_directory " $directory " virtual_keys[@] virtual_keys_values[@]
6765echo " Virutal Key replacement completed."
You can’t perform that action at this time.
0 commit comments