-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[api] [bash] Back to using Bash v3 by default
* Most systems use Bash v3 by default * Adds configuration option for Bash v4 * Bash v4 is required for associative arrays * Should fix tests on Travis
- Loading branch information
Showing
4 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
var fs = require('fs'); | ||
|
||
module.exports = { | ||
bash: { | ||
version: 3 | ||
}, | ||
http: { | ||
port: 3000, | ||
host: "0.0.0.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# bash 4 is required for Hook_params nested object | ||
for k in "${!Hook_params[@]}" | ||
do | ||
echo "$k=${Hook_params[$k]}" | ||
done | ||
done | ||
|
||
# with bash 3 properties are accessed using the syntax: | ||
echo $Hook_params_foo; | ||
# where "foo" is the name of the http request parameter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters