Skip to content

Commit aedef62

Browse files
committed
fix script
1 parent 006e369 commit aedef62

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

skills/cloud-sql-postgres-data/scripts/execute_sql.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const OPTIONAL_VARS_TO_OMIT_IF_EMPTY = [
3737
* @param {Object} env The environment object to populate.
3838
*/
3939
function mergeContextualVariables(env) {
40-
const additionalVars = {};
40+
const env = {};
4141

4242
if (process.env.GEMINI_CLI === '1') {
4343
const envPath = path.resolve(__dirname, '../../../.env');
@@ -49,23 +49,17 @@ function mergeContextualVariables(env) {
4949
if (splitIdx === -1) return;
5050
const key = trimmed.slice(0, splitIdx).trim();
5151
const value = trimmed.slice(splitIdx + 1).trim().replace(/(^['"]|['"]$)/g, '');
52-
additionalVars[key] = value;
52+
env[key] = value;
5353
});
5454
}
5555
} else if (process.env.CLAUDECODE === '1') {
5656
const prefix = 'CLAUDE_PLUGIN_OPTION_';
5757
for (const key in process.env) {
5858
if (key.startsWith(prefix)) {
59-
additionalVars[key.substring(prefix.length)] = process.env[key];
59+
env[key.substring(prefix.length)] = process.env[key];
6060
}
6161
}
6262
}
63-
64-
for (const [key, value] of Object.entries(additionalVars)) {
65-
if (env[key] === undefined) {
66-
env[key] = value;
67-
}
68-
}
6963
}
7064

7165
/**

0 commit comments

Comments
 (0)