Skip to content

Commit

Permalink
feat: secrets env now uses single -- to separate commands
Browse files Browse the repository at this point in the history
fix: updated tests

chore: removed redundant tests
  • Loading branch information
aryanjassal committed Nov 21, 2024
1 parent 73e25d8 commit 58f4752
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 344 deletions.
6 changes: 3 additions & 3 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class ErrorPolykeyCLIUnexpectedError<T> extends ErrorPolykeyCLI<T> {
exitCode = sysexits.SOFTWARE;
}

class ErrorPolykeyCLISubprocessFailure<T> extends ErrorPolykeyCLI<T> {
static description = 'A subprocess failed to exit gracefully';
class ErrorPolykeyCLIChildProcessFailure<T> extends ErrorPolykeyCLI<T> {
static description = 'A child process failed to exit gracefully';
exitCode = sysexits.UNKNOWN;
}

Expand Down Expand Up @@ -196,7 +196,7 @@ export {
ErrorPolykeyCLIUncaughtException,
ErrorPolykeyCLIUnhandledRejection,
ErrorPolykeyCLIUnexpectedError,
ErrorPolykeyCLISubprocessFailure,
ErrorPolykeyCLIChildProcessFailure,
ErrorPolykeyCLIAsynchronousDeadlock,
ErrorPolykeyCLINodePath,
ErrorPolykeyCLIClientOptions,
Expand Down
4 changes: 2 additions & 2 deletions src/secrets/CommandEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CommandEdit extends CommandPolykey {
};
const onError = (e: Error) => {
cleanup();
const error = new errors.ErrorPolykeyCLISubprocessFailure(
const error = new errors.ErrorPolykeyCLIChildProcessFailure(
`Failed to run command '${process.env.EDITOR}'`,
{ cause: e },
);
Expand All @@ -129,7 +129,7 @@ class CommandEdit extends CommandPolykey {
const onClose = (code: number | null) => {
cleanup();
if (code !== 0) {
const error = new errors.ErrorPolykeyCLISubprocessFailure(
const error = new errors.ErrorPolykeyCLIChildProcessFailure(
`Editor exited with code ${code}`,
);
reject(error);
Expand Down
Loading

0 comments on commit 58f4752

Please sign in to comment.