Does not execute default values, subshells, etc.

Abierto
#402 2 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
32/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python, shell
Área
devops, tooling

Línea de trabajo

Start by reviewing the documented examples in this issue and the referenced issues #326 and #322, then determine which shell constructs python-dotenv should support. The expected result is correctly resolved default values, substitutions, and command substitutions, but the issue does not name source files or tests; resolve scope and execution safety before implementation.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

if you have a standard .env file:

export USER_EMAIL="${USER_EMAIL:-$(git config --get user.email)}"
export JOB_NAME="${CI_PROJECT_PATH//\//-}"
export UPPER_STAGE=$( echo $CI_ENVIRONMENT_STAGE | awk '{ print toupper(substr($1,1,1)) substr($1,2) }' )
export BUILD_JOB_NAME="Build Job Definition $UPPER_STAGE"

values do not get parsed correctly:

USER_EMAIL=""
JOB_NAME=""
UPPER_STAGE=$( echo $CI_ENVIRONMENT_STAGE | awk '{ print toupper(substr($1,1,1)) substr($1,2) }' )
BUILD_JOB_NAME=Build Job Definition $UPPER_STAGE

See also: https://github.com/theskumar/python-dotenv/issues/326 (1 year ago, no response)
See also: https://github.com/theskumar/python-dotenv/issues/322 (1 year ago, no response)

Happy to open to a PR for this. I think we just need to use python to execute the commands in a shell and set value to the result.

Lenguaje dominante
Python
Estrellas
8.9k
Forks
581
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de theskumar/python-dotenv

Todos los issues de theskumar/python-dotenv

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.