Skip to content

Commit

Permalink
fix: update template_external_url to replace hyphens with underscores
Browse files Browse the repository at this point in the history
External URLs with a hyphen in the name were broken, because the injected env var replaced the hyphen with an underscore but the discovery code did not.
  • Loading branch information
andruwm committed Dec 23, 2024
1 parent 45cc4f8 commit 390343a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function template_service(service_name: string, interface_name: string, value: s
}

function template_external_url(input_url: string) {
return `EXTERNAL_URL_${input_url.toUpperCase().replace(/\./g, "_")}`;
return `EXTERNAL_URL_${input_url.toUpperCase().replace(/\./g, "_").replace(/-/g, "_")}`;
}

function get_var(env_var: string) {
Expand Down

0 comments on commit 390343a

Please sign in to comment.