Commit c130f0629d30ed83efb812e5c37be6cd8e829e66
1 parent
3259d858
Exists in
wikilibras
Add wikilibras python script path to .env and initializer
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
config/examples/.env.example
config/initializers/check_env_vars.rb
| ... | ... | @@ -5,3 +5,10 @@ end |
| 5 | 5 | if ENV['VLIBRAS_API_URL'].nil? || ENV['VLIBRAS_API_URL'].empty? |
| 6 | 6 | raise 'VLIBRAS_API_URL must be set in .env' |
| 7 | 7 | end |
| 8 | + | |
| 9 | +if ENV['WIKILIBRAS_PYTHON_SCRIPT_PATH'].nil? || ENV['WIKILIBRAS_PYTHON_SCRIPT_PATH'].empty? | |
| 10 | + raise 'WIKILIBRAS_PYTHON_SCRIPT_PATH must be set in .env' | |
| 11 | +end | |
| 12 | + | |
| 13 | +`test -e #{ENV['WIKILIBRAS_PYTHON_SCRIPT_PATH']}` | |
| 14 | +raise SystemCallError, "WIKILIBRAS_PYTHON_SCRIPT_PATH not found" unless $?.success? | ... | ... |