Some cleanup

This commit is contained in:
Jan Oberhauser
2021-03-25 11:23:54 +01:00
parent 5f96f01f24
commit 0c0c0bda67
8 changed files with 23 additions and 24 deletions

View File

@@ -140,7 +140,7 @@ export class ExportCredentialsCommand extends Command {
let fileContents: string, i: number;
for (i = 0; i < credentials.length; i++) {
fileContents = JSON.stringify(credentials[i], null, flags.pretty ? 2 : undefined);
const filename = (flags.output!.endsWith(path.sep) ? flags.output! : flags.output + path.sep) + credentials[i].id + ".json";
const filename = (flags.output!.endsWith(path.sep) ? flags.output! : flags.output + path.sep) + credentials[i].id + '.json';
fs.writeFileSync(filename, fileContents);
}
console.log('Successfully exported', i, 'credentials.');