Skip to content

Commit 492a2a3

Browse files
committed
fix: simplify password parsing in Docker.tsx for GCP
1 parent ab599ac commit 492a2a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/dockerRegistry/Docker.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,10 @@ const DockerForm = ({
796796
selectedDockerRegistryType.value === RegistryType.GCR
797797
? {
798798
username: trimmedUsername,
799-
password: JSON.stringify(JSON.parse(parsePassword(customState.password.value) || '{}')).replace(
800-
/\{\}/g,
801-
'',
802-
),
799+
password:
800+
customState.password.value === DEFAULT_SECRET_PLACEHOLDER
801+
? ''
802+
: `'${JSON.stringify(JSON.parse(customState.password.value))}'`,
803803
}
804804
: {}),
805805
...(registryStorageType !== RegistryStorageType.OCI_PUBLIC &&

0 commit comments

Comments
 (0)