From fd2beb3532c742c21a956ba4a11abf1c92f22f71 Mon Sep 17 00:00:00 2001 From: Kailash Choudhary Date: Wed, 12 Jun 2024 12:02:13 +0530 Subject: [PATCH] fix: path variable re declaration --- services/code.service.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/code.service.js b/services/code.service.js index 00e032be..07eed2b3 100644 --- a/services/code.service.js +++ b/services/code.service.js @@ -17,7 +17,6 @@ const puppeteer = require('puppeteer'); const express = require('express') const http = require('http') const { spawn } = require('child_process'); -const path = require('path') const appConfig = require('../configs/app.config.js') const { FRONTEND_STATIC_JASMINE } = require('../enums/supportedMultifileSetupTypes.js') const axios = require('axios') @@ -517,7 +516,7 @@ const execute = async (req, res) => { success: [], failed: [], } - await _executeMultiFile(req, res, response) + await _executeMultiFile(req, res, response) } else if (req.language === supportedLanguages.SQLITE3) { await _executeSqlite3Query(req, res, response) } else { @@ -837,7 +836,7 @@ const _executeMultiFile = async (req, res, response) => { await _cleanUpDir(appConfig.multifile.workingDir, appConfig.multifile.submissionFileDownloadPath) response.output = jasmineResults } catch (err) { - if(err.message === 'No package.json found' || err.message.includes('Browser was not found at')) { + if (err.message === 'No package.json found' || err.message.includes('Browser was not found at')) { throw err } else { // respond with empty success and failed array