Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async ensureKeybaseFilePathToProof(base: string) {
const segments = keybaseFilePathToProof.split('/')
let currentPath = base
for (let i = 0; i < segments.length - 1; i++) {
currentPath += segments[i] + '/'
if (!(await execWith0Exit('keybase', ['fs', 'ls', currentPath], { silent: true }))) {
await execCmdWithError('keybase', ['fs', 'mkdir', currentPath], { silent: true })
}
}
}
}