Skip to content

Commit

Permalink
fix(core): handle empty lines in dotenv files (#18829)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz authored Aug 25, 2023
1 parent 889f315 commit aa9526f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ function parseEnvFile(tree: Tree, envFilePath: string) {
.split('\n')
.map((line) => {
line = line.trim();

if (!line.includes('$')) {
return line;
}

const declarations = line.split('=');
if (declarations[1].includes('$') && !declarations[1].includes(`\\$`)) {
declarations[1] = declarations[1].replace('$', `\\$`);
Expand Down

0 comments on commit aa9526f

Please sign in to comment.