Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ inputs:
description: 'Additional options supported by postgresql simple SQL shell. These options will be applied when executing the given file on the Azure DB for Postgresql. In case of multiple files, the same args will be applied for all files'
required: false
runs:
using: 'node12'
using: 'node16'
main: 'lib/main.js'
3 changes: 2 additions & 1 deletion src/Utils/ActionInputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export class ActionInputs {
}

private parseConnectionString() {
this._connectionString = this._connectionString.replace('psql', "").replace(/["]+/g, '').trim();
// Replace the "psql " part of the psql command copied from the Azure portal connection info
this._connectionString = this._connectionString.replace(/^psql\s/,'').replace(/["]+/g, '').trim();
if (!this.validateConnectionString()) {
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`);
}
Expand Down