Skip to content

Commit faba5e0

Browse files
committed
Support hostnames that include "psql"
Update the documentation Fix typo Better backwards compatibility Clean up
1 parent 1d47d25 commit faba5e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Utils/ActionInputs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export class ActionInputs {
2424
}
2525

2626
private parseConnectionString() {
27-
this._connectionString = this._connectionString.replace('psql', "").replace(/["]+/g, '').trim();
27+
// Replace the "psql " part of the psql command copied from the Azure portal connection info
28+
this._connectionString = this._connectionString.replace(/^psql\s/,'').replace(/["]+/g, '').trim();
2829
if (!this.validateConnectionString()) {
2930
throw new Error(`Please provide a valid connection string. A valid connection string is a series of keyword/value pairs separated by space. Spaces around the equal sign are optional. To write an empty value, or a value containing spaces, surround it with single quotes, e.g., keyword = 'a value'. Single quotes and backslashes within the value must be escaped with a backslash`);
3031
}

0 commit comments

Comments
 (0)