Skip to content

Commit 754e672

Browse files
authored
fix: remove password from error log (#658)
1 parent f4e556e commit 754e672

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/otomi-stack.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ export default class OtomiStack {
248248
if (await this.repo.fileExists('env/cluster.yaml')) break
249249
debug(`Values are not present at ${url}:${branch}`)
250250
} catch (e) {
251-
debug(`${e.message.trim()} for command ${JSON.stringify(e.task?.commands)}`)
251+
// Remove password from error message
252+
const safeCommand = JSON.stringify(e.task?.commands).replace(env.GIT_PASSWORD, '****')
253+
debug(`${e.message.trim()} for command ${JSON.stringify(safeCommand)}`)
252254
debug(`Git repository is not ready: ${url}:${branch}`)
253255
}
254256
const timeoutMs = 10000

0 commit comments

Comments
 (0)