diff --git a/index.js b/index.js index 04188e9..e3159aa 100755 --- a/index.js +++ b/index.js @@ -45,7 +45,13 @@ const converter = createConverter({ let timer = process.hrtime(); const dotnetProject = path.join(__dirname, 'lib/csharp-models-to-json'); -const dotnetProcess = spawn('dotnet', ['run', `--project "${dotnetProject}"`, `"${path.resolve(configPath)}"`], { shell: true }); + +let processParameters = ['run', `--project "${dotnetProject}"`, `"${path.resolve(configPath)}"`]; +if (config.suppressEolFrameworkErrors){ + processParameters.push('--property:CheckEolTargetFramework=false'); +} + +const dotnetProcess = spawn('dotnet', processParameters, { shell: true }); let stdout = '';