From 25edaefe269986509026af6ce7bca242e021465e Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 12 May 2021 10:10:40 +0530 Subject: [PATCH] assertCommand removed --- libs/remixd/src/services/hardhatClient.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/libs/remixd/src/services/hardhatClient.ts b/libs/remixd/src/services/hardhatClient.ts index 3b86a2e637..e2f58ee624 100644 --- a/libs/remixd/src/services/hardhatClient.ts +++ b/libs/remixd/src/services/hardhatClient.ts @@ -22,7 +22,6 @@ export class HardhatClient extends PluginClient { } compile (cmd: string) { - // assertCommand(cmd) const options = { cwd: this.currentSharedFolder, shell: true } const child = spawn(cmd, options) let result = '' @@ -42,14 +41,3 @@ export class HardhatClient extends PluginClient { }) } } - -/** - * Validate that command can be run by service - * @param cmd - */ -function assertCommand (cmd) { - const regex = '^hardhat\\s[^&|;]*$' - if (!RegExp(regex).test(cmd)) { // git then space and then everything else - throw new Error('Invalid command for service!') - } -}