Skip to content

fix: handle no port exists scenario gracefully#430

Merged
karthikscale3 merged 1 commit intoScale3-Labs:mainfrom
DSdatsme:fix-db-port-ep-parse
May 4, 2025
Merged

fix: handle no port exists scenario gracefully#430
karthikscale3 merged 1 commit intoScale3-Labs:mainfrom
DSdatsme:fix-db-port-ep-parse

Conversation

@DSdatsme
Copy link
Contributor

@DSdatsme DSdatsme commented May 3, 2025

If a DB port is not mentioned in POSTGRES_HOST value, the value of DB_PORT is the same as DB_HOST, this is because cut -f2 returns the same value (first element) when it does not find its index.

to avoid such scenarios, we use -s that suppresses output if the delimiter is not found.

@karthikscale3 karthikscale3 merged commit b94e15c into Scale3-Labs:main May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants