Skip to content

Commit

Permalink
lint: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
philipparndt committed Jan 6, 2024
1 parent 5436e7e commit 40f2f6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/lib/config/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ describe("Config", () => {
},
hue: {
host: "192.168.1.1",
// eslint-disable-next-line no-template-curly-in-string
"api-key": "${API_KEY}"
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/lib/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ export const applyDefaults = (config: any) => {
} as Config
}

function replaceEnvVariables(input: string) {
const envVariableRegex = /\${([^}]+)}/g;
function replaceEnvVariables (input: string) {
const envVariableRegex = /\${([^}]+)}/g

return input.replace(envVariableRegex, (_, envVarName) => {
return process.env[envVarName] || '';
return process.env[envVarName] || ""
})
}

Expand Down

0 comments on commit 40f2f6f

Please sign in to comment.