From 56a78ddfd35d0d477d416fa2023dc5b7e141757e Mon Sep 17 00:00:00 2001 From: ayush-coder-hai Date: Wed, 4 Oct 2023 03:46:05 +0530 Subject: [PATCH 1/2] remove the redundant blocks. --- src/commands/config/context/add.ts | 2 -- src/commands/config/context/current.ts | 2 -- src/commands/config/context/edit.ts | 2 -- src/commands/config/context/list.ts | 2 -- src/commands/config/context/remove.ts | 2 -- src/commands/config/context/use.ts | 2 -- 6 files changed, 12 deletions(-) diff --git a/src/commands/config/context/add.ts b/src/commands/config/context/add.ts index 1ec57606d69..e717b77230c 100644 --- a/src/commands/config/context/add.ts +++ b/src/commands/config/context/add.ts @@ -54,9 +54,7 @@ export default class ContextAdd extends Command { ); return; } - { throw e; - } } } } diff --git a/src/commands/config/context/current.ts b/src/commands/config/context/current.ts index 6b28b7184de..8c982bd9d5a 100644 --- a/src/commands/config/context/current.ts +++ b/src/commands/config/context/current.ts @@ -39,9 +39,7 @@ export default class ContextCurrent extends Command { ); return; } - { throw e; - } } if (fileContent) { diff --git a/src/commands/config/context/edit.ts b/src/commands/config/context/edit.ts index 413e254e322..a23c1bad7d3 100644 --- a/src/commands/config/context/edit.ts +++ b/src/commands/config/context/edit.ts @@ -44,9 +44,7 @@ export default class ContextEdit extends Command { this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`); return; } - { throw e; - } } } } diff --git a/src/commands/config/context/list.ts b/src/commands/config/context/list.ts index 47fee998e6e..8f923f803ef 100644 --- a/src/commands/config/context/list.ts +++ b/src/commands/config/context/list.ts @@ -41,9 +41,7 @@ export default class ContextList extends Command { ); return; } - { throw e; - } } } } diff --git a/src/commands/config/context/remove.ts b/src/commands/config/context/remove.ts index 8c5ebb501d6..9f0be8835ba 100644 --- a/src/commands/config/context/remove.ts +++ b/src/commands/config/context/remove.ts @@ -40,9 +40,7 @@ export default class ContextRemove extends Command { this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`); return; } - { throw e; - } } } } diff --git a/src/commands/config/context/use.ts b/src/commands/config/context/use.ts index 9ce72a97680..0b3dcf8cbe3 100644 --- a/src/commands/config/context/use.ts +++ b/src/commands/config/context/use.ts @@ -40,9 +40,7 @@ export default class ContextUse extends Command { this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`); return; } - { throw e; - } } } } From 3bcb42555b15077852dd5ac317e532802099f5e2 Mon Sep 17 00:00:00 2001 From: ayush-coder-hai Date: Wed, 4 Oct 2023 03:50:22 +0530 Subject: [PATCH 2/2] Added correct spacing --- src/commands/config/context/add.ts | 2 +- src/commands/config/context/current.ts | 2 +- src/commands/config/context/edit.ts | 2 +- src/commands/config/context/list.ts | 2 +- src/commands/config/context/remove.ts | 2 +- src/commands/config/context/use.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands/config/context/add.ts b/src/commands/config/context/add.ts index e717b77230c..c9db39f68a0 100644 --- a/src/commands/config/context/add.ts +++ b/src/commands/config/context/add.ts @@ -54,7 +54,7 @@ export default class ContextAdd extends Command { ); return; } - throw e; + throw e; } } } diff --git a/src/commands/config/context/current.ts b/src/commands/config/context/current.ts index 8c982bd9d5a..3227b7a83f3 100644 --- a/src/commands/config/context/current.ts +++ b/src/commands/config/context/current.ts @@ -39,7 +39,7 @@ export default class ContextCurrent extends Command { ); return; } - throw e; + throw e; } if (fileContent) { diff --git a/src/commands/config/context/edit.ts b/src/commands/config/context/edit.ts index a23c1bad7d3..2042a161cb1 100644 --- a/src/commands/config/context/edit.ts +++ b/src/commands/config/context/edit.ts @@ -44,7 +44,7 @@ export default class ContextEdit extends Command { this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`); return; } - throw e; + throw e; } } } diff --git a/src/commands/config/context/list.ts b/src/commands/config/context/list.ts index 8f923f803ef..6065476d136 100644 --- a/src/commands/config/context/list.ts +++ b/src/commands/config/context/list.ts @@ -41,7 +41,7 @@ export default class ContextList extends Command { ); return; } - throw e; + throw e; } } } diff --git a/src/commands/config/context/remove.ts b/src/commands/config/context/remove.ts index 9f0be8835ba..646a1d408bd 100644 --- a/src/commands/config/context/remove.ts +++ b/src/commands/config/context/remove.ts @@ -40,7 +40,7 @@ export default class ContextRemove extends Command { this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`); return; } - throw e; + throw e; } } } diff --git a/src/commands/config/context/use.ts b/src/commands/config/context/use.ts index 0b3dcf8cbe3..d85b290cccc 100644 --- a/src/commands/config/context/use.ts +++ b/src/commands/config/context/use.ts @@ -40,7 +40,7 @@ export default class ContextUse extends Command { this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`); return; } - throw e; + throw e; } } }