Commit ca9e899
committed
chore: ensure init-deployment.sh works when invoked using sudo
Recent testing of the cookiecutter deployment template surfaced a bug in the validate_python_cmd
function of the init-deployment.sh script. The command that checks that the jinja2 library was
installed would break when you ran init-deployment.sh using the `--python` option in tandem with
sudo. The root cause was that the way the command is quoted before it is passed to `python -c` was
not compatible with all bash invocation modes. This commit fixes the function to be broadly
compatible.1 parent e3b7bec commit ca9e899
1 file changed
Lines changed: 14 additions & 6 deletions
File tree
- cookiecutter-templates/cookiecutter-dioptra-deployment/{{cookiecutter.__project_slug}}
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
| |||
0 commit comments