Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanjassal committed Aug 26, 2024
1 parent b63e2ba commit 4f7d704
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/secrets/CommandEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type PolykeyClient from 'polykey/dist/PolykeyClient';
import fs from 'fs';
import path from 'path';
import CommandPolykey from '../CommandPolykey';
import * as vaultsErrors from 'polykey/dist/vaults/errors';
import * as errors from '../errors';
import * as binUtils from '../utils';
import * as binOptions from '../utils/options';
Expand Down Expand Up @@ -63,14 +62,16 @@ class CommandEdit extends CommandPolykey {
secretName: secretPath[1],
});
} catch (e) {
if (e.cause.name == 'ErrorSecretsSecretUndefined') {
pkClient.rpcClient.methods.vaultsSecretsNew({
if (e.cause.name === 'ErrorSecretsSecretUndefined') {
await pkClient.rpcClient.methods.vaultsSecretsNew({
metadata: auth,
nameOrId: secretPath[0],
secretName: secretPath[1],
secretContent: '',
});
} else throw e;
} else {
throw e;
}
}

return pkClient.rpcClient.methods.vaultsSecretsGet({
Expand Down

0 comments on commit 4f7d704

Please sign in to comment.