assertCommand removed

pull/1202/head
aniket-engg 4 years ago committed by Aniket
parent 2c9149e67a
commit 25edaefe26
  1. 12
      libs/remixd/src/services/hardhatClient.ts

@ -22,7 +22,6 @@ export class HardhatClient extends PluginClient {
} }
compile (cmd: string) { compile (cmd: string) {
// assertCommand(cmd)
const options = { cwd: this.currentSharedFolder, shell: true } const options = { cwd: this.currentSharedFolder, shell: true }
const child = spawn(cmd, options) const child = spawn(cmd, options)
let result = '' 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!')
}
}

Loading…
Cancel
Save