From 13e4bbfeaa9d49eda4e621a6e221ad7a97110b17 Mon Sep 17 00:00:00 2001 From: minds <0xminds@gmail.com> Date: Sun, 24 Nov 2024 14:07:34 +0300 Subject: [PATCH] Fix syntax error gen.sh (#341) **Description:** This PR addresses a small syntax error in the bash script. The original line: ```bash for file in "${@: 2}"; do ``` has an unnecessary space after the colon. The corrected line is: ```bash for file in "${@:2}"; do ``` **Explanation of the fix:** In bash scripting, the correct syntax for parameter expansion with the `@` symbol is `"{@:2}"` (without the space). The presence of the space could lead to unexpected behavior or errors in some bash environments. This fix ensures that the script will function as intended. **Why this is important:** While this issue may not always cause a failure, adhering to the correct syntax ensures compatibility across different bash versions and prevents potential bugs, especially when dealing with positional parameters in loops. This change improves the stability and reliability of the script. ## Summary by CodeRabbit - **Chores** - Minor syntax improvement in the script for better adherence to standard practices. --- scripts/gen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen.sh b/scripts/gen.sh index 3f80bd4c..a0fe5594 100755 --- a/scripts/gen.sh +++ b/scripts/gen.sh @@ -18,7 +18,7 @@ forge build -C lib/openzeppelin-contracts/contracts/proxy > /dev/null cd "$1" -for file in "${@: 2}"; do +for file in "${@:2}"; do mkdir -p ../wrappers/"${file}" contractName=$(basename "${file}" .sol)