gm3dmo/the-power

base64: invalid argument test-data/python/pip/requirements.txt_

Closed this issue · 2 comments

Describe the bug
During a run of bash build-all.sh I got an error:

+ ./create-commit-python-pip.sh
base64: invalid argument test-data/python/pip/requirements.txt_
Usage:  base64 [-hDd] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -Dd, --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)

To Reproduce
Steps to reproduce the behavior:

  1. Download and untar https://github.com/gm3dmo/the-power/archive/refs/tags/1.0.173.tar.gz
  2. In #support-ops, type .gheboot 3.7
  3. Log in to the appliance and manually create a PAT with all permissions
  4. Run 'python3 configure.py' and answer the questions, paste in your token etc.
  5. Run 'bash build-all.sh'
  6. Get the base64 error pasted above

Expected behavior
No error.

Screenshots
None

Desktop (please complete the following information):

  • OS: MacOS Ventura 13.1
  • Browser: Chrome
  • Version 108.0.5359.124

Smartphone (please complete the following information):
N/A

Additional context
N/A

It might be a good idea to use set -e in every script to force bash to break on error.

Otherwise even if it encounters an error, bash could continue on as if nothing happened... which is what happened here. That could, in turn, lead to unexpected behavior.

Also, checking for errors could allow the script to handle such errors gracefully, such as by printing user-friendly error messages.

@mokshadharma see this #70 for some backstory on the base64 thing.