Skip to content

Commit 6bdd3ec

Browse files
authored
do not retry ExitErrors in ui.retryStep (#5668)
if the command is exiting due to user action (e.g., choosing not to continue) or an un-retryable problem then we should not prompt to retry
1 parent 750cdf1 commit 6bdd3ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ironfish-cli/src/ui/retry.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
44
import { ErrorUtils, Logger } from '@ironfish/sdk'
55
import { ux } from '@oclif/core'
6+
import { ExitError } from '@oclif/core/errors'
67
import { confirmList } from './prompt'
78

89
export async function retryStep<T>(
@@ -18,6 +19,10 @@ export async function retryStep<T>(
1819
const result = await stepFunction()
1920
return result
2021
} catch (error) {
22+
if (error instanceof ExitError) {
23+
throw error
24+
}
25+
2126
logger.log(`An Error Occurred: ${ErrorUtils.renderError(error)}`)
2227

2328
if (askToRetry) {

0 commit comments

Comments
 (0)