python-dotenv cannot parse valid bash value with a single quote "escaped" inside single quotes

Aperta
#544 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
bash, python
Ambito
tooling

Direzione di ricerca

Reproduce the issue by placing the shown VAR assignment in a .env file and running the mentioned dotenv list command. Start by tracing the dotenv parser used by that command and add or find parser tests for quoted values. Done means the line is accepted and the resulting value is I'm a student.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

This is a valid bash ENV excerpt which escapes a single quote inside value surrounded by singles quotes (see this SO comment)

❯ VAR='I'"'"'m a student'
❯ echo $VAR
I'm a student

However python dotenv cannot parse this value. Assume that .env file is created with VAR='I'"'"'m a student' line inside

❯ dotenv list
Python-dotenv could not parse statement starting at line 1
Lingua principale
Python
Stelle
8.9k
Fork
581
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di theskumar/python-dotenv

Tutte le issue di theskumar/python-dotenv

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.