Skip to content

Commit

Permalink
Merge pull request #108 from stewartbryson/stewart
Browse files Browse the repository at this point in the history
Support surrounding quotes in TOML file.
  • Loading branch information
stewartbryson authored Oct 31, 2023
2 parents bb0abe7 + bba1964 commit e5d91a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'java-library'
id 'com.adarshr.test-logger' version '4.0.0'
id "com.redpillanalytics.gradle-properties" version "1.0.8"
id 'com.fuseanalytics.gradle.s3' version '1.2.3'
id 'com.fuseanalytics.gradle.s3' version '1.2.4'
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ class SnowConfig {
ini.get(connectionName).each { key, value ->
props."${key.replaceAll(/name$/, '')}" = value
}

// Remove surrounding quotes from properties values
props = props.collectEntries { k, v -> [k, v.replaceAll(/^\"|\"$/, "")] }

// construct url from account
props.url = "https://" + props.account + ".snowflakecomputing.com"
props.remove("account")
// special password handling to support quoted values
props.password = props.password.toString().replaceAll(/("*)([^"$]+)("*)/) { all, q1, pwd, q2 ->
pwd
}

// we need at least these three to make a connection
if (!props.url || !props.user || !props.password) {
Expand Down

0 comments on commit e5d91a9

Please sign in to comment.