From a5d3e948388f532055e145dfa88c919b800a8bf9 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 12 Aug 2021 14:50:15 +0200 Subject: [PATCH] solc fix input params --- libs/remixd/src/services/slitherClient.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libs/remixd/src/services/slitherClient.ts b/libs/remixd/src/services/slitherClient.ts index e2d9a281bb..7eb7cf3806 100644 --- a/libs/remixd/src/services/slitherClient.ts +++ b/libs/remixd/src/services/slitherClient.ts @@ -123,7 +123,19 @@ export class SlitherClient extends PluginClient { const allowPathsOption: string = allowPaths ? `--allow-paths ${allowPaths}` : '' const optimizeOption: string = optimize ? ' --optimize ' : '' const evmOption: string = evmVersion ? ` --evm-version ${evmVersion}` : '' - const solcArgs: string = optimizeOption || evmOption || allowPathsOption ? `--solc-args '${allowPathsOption}${optimizeOption}${evmOption}'` : '' + let solcArgs = '' + if (optimizeOption) { + solcArgs += ' ' + optimizeOption + } + if (evmOption) { + solcArgs += ' ' + evmOption + } + if (allowPathsOption) { + solcArgs += ' ' + allowPathsOption + } + if (solcArgs) { + solcArgs = `--solc-args "${solcArgs.trim()}"` + } const solcRemaps = remaps ? `--solc-remaps "${remaps}"` : '' const outputFile: string = 'remix-slitherReport_' + Math.floor(Date.now() / 1000) + '.json'