hclq
hclq copied to clipboard
acutally read the -d DESTINATION and -a ARCH arguments
Needed trailing colon (:) for those args.
@mattolenik Could you please merge this?
Please ignore my above comment.
To others who come here, please take a look at https://github.com/hashicorp/hcl/tree/main/cmd/hcldec as an alternative.
@mattolenik , the PR looks correct, getopts
needs :
after the options followed by OPTARG
, meaning the diff should show:
diff --git a/install.sh b/install.sh
index b6fc803..8e00db5 100755
--- a/install.sh
+++ b/install.sh
@@ -46,7 +46,7 @@ platform_check() {
main() {
platform_check
- while getopts ":qhdao:" opt; do
+ while getopts ":qhd:a:o:" opt; do
case $opt in
q) QUIET=true ;;
d) DESTINATION="$OPTARG" ;;