You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute the generated script against a Bash with version <4.3
Currently the output is:
output/bash/petstore-cli: line 133: getOrderById:::orderId: syntax error in expression (error token is ":::orderId")
output/bash/petstore-cli: line 134: placeOrder:::body: syntax error in expression (error token is ":::body")
output/bash/petstore-cli: line 135: createUser:::body: syntax error in expression (error token is ":::body")
output/bash/petstore-cli: line 136: createUsersWithArrayInput:::body: syntax error in expression (error token is ":::body")
output/bash/petstore-cli: line 137: createUsersWithListInput:::body: syntax error in expression (error token is ":::body")
output/bash/petstore-cli: line 138: deleteUser:::username: syntax error in expression (error token is ":::username")
output/bash/petstore-cli: line 139: getUserByName:::username: syntax error in expression (error token is ":::username")
output/bash/petstore-cli: line 140: loginUser:::username: syntax error in expression (error token is ":::username")
output/bash/petstore-cli: line 141: loginUser:::password: syntax error in expression (error token is ":::password")
output/bash/petstore-cli: line 142: updateUser:::username: syntax error in expression (error token is ":::username")
output/bash/petstore-cli: line 143: updateUser:::body: syntax error in expression (error token is ":::body")
output/bash/petstore-cli: line 150: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
output/bash/petstore-cli: line 198: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
Sorry - your Bash version is 3.2.57(1)-release
You need at least Bash 4.3 to run this script.
Suggest a Fix
Move Bash version check to run at the beginning of the script.
In practice this issue is typical on MacOS, where the system Bash is at version 3, in order to use the generated scripts on mac it is necessary to install the latest Bash using Homebrew.
The text was updated successfully, but these errors were encountered:
Description
Improve error message when executing the script with older versions of Bash.
Swagger-codegen version
2.2.0-SNAPSHOT
Swagger declaration file content or url
This bug is independent of any particular Swagger definition.
Command line used for generation
Steps to reproduce
Execute the generated script against a Bash with version <4.3
Currently the output is:
Suggest a Fix
Move Bash version check to run at the beginning of the script.
In practice this issue is typical on MacOS, where the system Bash is at version 3, in order to use the generated scripts on mac it is necessary to install the latest Bash using Homebrew.
The text was updated successfully, but these errors were encountered: