chore: fix CI failing on the master branch

This commit is contained in:
Kyle Hensel 2025-08-05 20:00:00 +12:00
parent 35bee4087a
commit adf1934f01
No known key found for this signature in database
GPG Key ID: A6481E3E38D544EC
4 changed files with 6 additions and 6 deletions

2
dist/expand-envs.js vendored
View File

@ -6,6 +6,6 @@ export function expandEnvs(str, envs) {
return str.replace(/(?<!\\)\$[a-zA-Z0-9_]+/g, (varName) => { return str.replace(/(?<!\\)\$[a-zA-Z0-9_]+/g, (varName) => {
const varValue = envs[varName.slice(1)]; const varValue = envs[varName.slice(1)];
// const test = 42; // const test = 42;
return varValue === undefined ? varName : varValue.toString(); return varValue ?? varName;
}); });
} }

View File

@ -49,7 +49,7 @@ export async function getEnvFileVars(envFilePath) {
*/ */
export function parseEnvString(envFileString) { export function parseEnvString(envFileString) {
// First thing we do is stripe out all comments // First thing we do is stripe out all comments
envFileString = stripComments(envFileString.toString()); envFileString = stripComments(envFileString);
// Next we stripe out all the empty lines // Next we stripe out all the empty lines
envFileString = stripEmptyLines(envFileString); envFileString = stripEmptyLines(envFileString);
// Merge the file env vars with the current process env vars (the file vars overwrite process vars) // Merge the file env vars with the current process env vars (the file vars overwrite process vars)

View File

@ -8,6 +8,6 @@ export function expandEnvs(str: string, envs: Environment): string {
return str.replace(/(?<!\\)\$[a-zA-Z0-9_]+/g, (varName) => { return str.replace(/(?<!\\)\$[a-zA-Z0-9_]+/g, (varName) => {
const varValue = envs[varName.slice(1)] const varValue = envs[varName.slice(1)]
// const test = 42; // const test = 42;
return varValue === undefined ? varName : varValue.toString() return varValue ?? varName
}) })
} }

View File

@ -56,7 +56,7 @@ export async function getEnvFileVars(envFilePath: string): Promise<Environment>
*/ */
export function parseEnvString(envFileString: string): Environment { export function parseEnvString(envFileString: string): Environment {
// First thing we do is stripe out all comments // First thing we do is stripe out all comments
envFileString = stripComments(envFileString.toString()) envFileString = stripComments(envFileString)
// Next we stripe out all the empty lines // Next we stripe out all the empty lines
envFileString = stripEmptyLines(envFileString) envFileString = stripEmptyLines(envFileString)