Skip to content

Commit 64e7f4b

Browse files
committed
Fix formatting.
1 parent 23aa368 commit 64e7f4b

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/cliCommands.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ export function registerCommands(program: Command, deps: CliDependencies): void
965965
.addHelpText(
966966
'after',
967967
`\nExamples:\n $ openssl rand -base64 32 | latchkey auth re-encrypt ~/latchkey-export` +
968-
`\n $ echo "" | latchkey auth re-encrypt ~/latchkey-export --services gitlab slack`
968+
`\n $ echo "" | latchkey auth re-encrypt ~/latchkey-export --services gitlab slack`
969969
)
970970
.action(async (destinationDirectory: string, options: { services?: string[] }) => {
971971
refuseInGatewayMode(deps, 'auth re-encrypt');
@@ -975,10 +975,7 @@ export function registerCommands(program: Command, deps: CliDependencies): void
975975
deps.exit(1);
976976
}
977977

978-
const destination = join(
979-
destinationDirectory,
980-
basename(deps.config.credentialStorePath)
981-
);
978+
const destination = join(destinationDirectory, basename(deps.config.credentialStorePath));
982979
if (existsSync(destination)) {
983980
deps.errorLog(`Error: Destination file already exists: ${destination}`);
984981
deps.errorLog('Remove it first or choose a different destination directory.');

tests/cli.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -995,10 +995,7 @@ describe('CLI commands with dependency injection', () => {
995995
return JSON.parse(storage.readFile(path) ?? '{}') as Record<string, unknown>;
996996
}
997997

998-
function withStdinKey(
999-
key: string,
1000-
overrides: Partial<CliDependencies> = {}
1001-
): CliDependencies {
998+
function withStdinKey(key: string, overrides: Partial<CliDependencies> = {}): CliDependencies {
1002999
return createMockDependencies({ readStdin: () => Promise.resolve(key), ...overrides });
10031000
}
10041001

@@ -1061,7 +1058,10 @@ describe('CLI commands with dependency injection', () => {
10611058
await runCommand(['auth', 're-encrypt', destinationDirectory, '--services', 'slack'], deps);
10621059

10631060
expect(exitCode).toBeNull();
1064-
const reEncrypted = readWithKey(join(destinationDirectory, STORE_FILENAME), NEW_ENCRYPTION_KEY);
1061+
const reEncrypted = readWithKey(
1062+
join(destinationDirectory, STORE_FILENAME),
1063+
NEW_ENCRYPTION_KEY
1064+
);
10651065
expect(Object.keys(reEncrypted)).toEqual(['slack']);
10661066
});
10671067

0 commit comments

Comments
 (0)