lifadev / archive_aws-lambda-go-shim

Author your AWS Lambda functions in Go, effectively.

Home Page:https://github.com/eawsy/aws-lambda-go-shim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

preview.bash not working on osx

dragonfax opened this issue · comments

\e[32m> Invoke AWS Lambda function\e[0m
base64: invalid option -- d
Usage:	base64 [-hvD] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -D, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)
17245-jstillwell:aws-go-test jstillwell$ aws --version
aws-cli/1.11.118 Python/2.7.13 Darwin/16.7.0 botocore/1.5.81

Installed via brew on macos 10.12

Works fine if I change it to a capital D

@dragonfax thx for reporting this issue. The script was initially developed for Linux users, also we should adapt it to make it more portable. I will keep the issue open until os specific commands are added to the script.

I think the capital D option that works on Mac may not work on Linux.

As someone once said, the shell is often more portable than a simple shell script.

A better option is to replace the shell script will a script written in a proper programming language, which is often available pre-installed, for example Python.

Y'all overthink things.

@cristim IMHO you're right and we definitely should abandon writing such scripts in bash and python is the good choice. But here @dragonfax comes with a surgical #43 and it allows us to avoid developing something not very essential to the core of the project.