Skip to content

Commit b1e53da

Browse files
authored
Merge pull request #336 from MatrixAI/feature-env-command-parsing
Use a single `--` instead of needing double `--` to separate commands
2 parents 73e25d8 + 58f4752 commit b1e53da

File tree

6 files changed

+294
-344
lines changed

6 files changed

+294
-344
lines changed

src/errors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class ErrorPolykeyCLIUnexpectedError<T> extends ErrorPolykeyCLI<T> {
8484
exitCode = sysexits.SOFTWARE;
8585
}
8686

87-
class ErrorPolykeyCLISubprocessFailure<T> extends ErrorPolykeyCLI<T> {
88-
static description = 'A subprocess failed to exit gracefully';
87+
class ErrorPolykeyCLIChildProcessFailure<T> extends ErrorPolykeyCLI<T> {
88+
static description = 'A child process failed to exit gracefully';
8989
exitCode = sysexits.UNKNOWN;
9090
}
9191

@@ -196,7 +196,7 @@ export {
196196
ErrorPolykeyCLIUncaughtException,
197197
ErrorPolykeyCLIUnhandledRejection,
198198
ErrorPolykeyCLIUnexpectedError,
199-
ErrorPolykeyCLISubprocessFailure,
199+
ErrorPolykeyCLIChildProcessFailure,
200200
ErrorPolykeyCLIAsynchronousDeadlock,
201201
ErrorPolykeyCLINodePath,
202202
ErrorPolykeyCLIClientOptions,

src/secrets/CommandEdit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class CommandEdit extends CommandPolykey {
120120
};
121121
const onError = (e: Error) => {
122122
cleanup();
123-
const error = new errors.ErrorPolykeyCLISubprocessFailure(
123+
const error = new errors.ErrorPolykeyCLIChildProcessFailure(
124124
`Failed to run command '${process.env.EDITOR}'`,
125125
{ cause: e },
126126
);
@@ -129,7 +129,7 @@ class CommandEdit extends CommandPolykey {
129129
const onClose = (code: number | null) => {
130130
cleanup();
131131
if (code !== 0) {
132-
const error = new errors.ErrorPolykeyCLISubprocessFailure(
132+
const error = new errors.ErrorPolykeyCLIChildProcessFailure(
133133
`Editor exited with code ${code}`,
134134
);
135135
reject(error);

0 commit comments

Comments
 (0)