Skip to content

Commit 3773a29

Browse files
authored
fix: encryption (#1919)
1 parent b5ac229 commit 3773a29

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/common/crypt.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,11 @@ const processFileChunk = async (crypt: CR, files: string[]): Promise<(ProcessOut
7171
return res
7272
})
7373
.catch(async (error) => {
74-
if (error.message.includes('Already encrypted')) {
74+
if (error.message.includes('Already encrypted') && (await pathExists(`${file}.dec`))) {
7575
const res = await $`helm secrets encrypt ${file}.dec`
7676
await $`echo ${res.stdout} > ${file}`
7777
if (crypt.post) await crypt.post(file)
7878
return res
79-
} else {
80-
d.error(error)
81-
throw error
8279
}
8380
})
8481
}

0 commit comments

Comments
 (0)