Created
June 25, 2024 15:41
-
-
Save bukowa/5df8b249f2d39d955e2d4ca30ba0e124 to your computer and use it in GitHub Desktop.
jq create arguments from json
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
# 1. '-b' flag in jq gets rid of the line breaks | |
# which is problematic on windows CLRF | |
# 2. '| xargs' after jq is used to trim the extra quotes | |
# that are problematic when passing the arguments to other | |
# command into a subshell | |
# get the arguments for the e2e tests | |
_get_e2e_args: | |
#!/bin/bash | |
jq -b -n -r --slurpfile b .build/.build_data.json \ | |
' | |
"--tauri_app_binary=\"\($b[0].tauri_app_binary)\" | |
--tauri_driver_binary=\"\($b[0].tauri_driver_binary)\" | |
--webdriver_binary=\"\($b[0].webdriver_binary)\""' \ | |
| xargs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment