resolve secret references pasted with surrounding quotes

This commit is contained in:
Jarek Krochmalski committed 2026-09-06 17:03:47 +05:30
1 parent 07f29f5afc
commit a22ed6b809
7 files changed
+129 -7

No files matched your search

+2 -1
View File
@@ -28,6 +28,7 @@ import { chmod, mkdtemp, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { isAbsolute, join } from 'node:path';
import type { ProtonConfig, SecretProvider, TestConnectionResult } from './shared';
import { stripSurroundingQuotes } from './shared';
const DEFAULT_PASS_CLI_PATH = '/usr/local/bin/pass-cli';
const LOGIN_TIMEOUT_MS = 30_000;
@@ -368,7 +369,7 @@ export const protonProvider: SecretProvider<ProtonConfig> = {
supportsBulk: true,
isReference(value: unknown): value is string {
return typeof value === 'string' && value.trim().startsWith('pass://');
return typeof value === 'string' && stripSurroundingQuotes(value).startsWith('pass://');
},
async testConnection(config: ProtonConfig): Promise<TestConnectionResult> {