modern-data-warehouse-dataops icon indicating copy to clipboard operation
modern-data-warehouse-dataops copied to clipboard

[BUG] post_create script should ensure all sh files are executable

Open elenaterenzi opened this issue 1 year ago • 1 comments

Description

  • When a new sh file is added to the sample, you will need to remember to do a chmod +x scripts to ensure all scripts are executable

Expected Behavior

  • Deployment does not fail because scripts cannot be executed

Reproduce

  1. Create a new sh file
  2. try to execute it
  3. you will get a bash: line 1: /path/to/script.sh: Permission denied

elenaterenzi avatar Feb 07 '25 15:02 elenaterenzi

Additionally, all .sh scripts should also reflect LF line endings when attempting to run in bash. Windows (including WSL) is not always set correctly and CRLF causes failures when trying to run the scripts in bash. We should consider including a .gitattributes file to ensure that .sh files have LF only line endings.

Sample .gitattributes file:

*.sh		text eol=lf

bsherwin avatar Mar 24 '25 20:03 bsherwin

Will include guidance to contributing.md

bsherwin avatar Jun 25 '25 20:06 bsherwin