From 3861ed20850fc3678152e40c7ece20bb8bfc8e7b Mon Sep 17 00:00:00 2001 From: Zvi Grinberg Date: Wed, 10 Jul 2024 16:15:59 +0300 Subject: [PATCH] fix: linting errors Signed-off-by: Zvi Grinberg --- src/providers/javascript_npm.js | 14 +++++++------- src/providers/python_controller.js | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/providers/javascript_npm.js b/src/providers/javascript_npm.js index 46a4081..982e894 100644 --- a/src/providers/javascript_npm.js +++ b/src/providers/javascript_npm.js @@ -25,18 +25,18 @@ export var npmInteractions = { createPackageLock: function createPackageLock(npm, manifestDir) { // in windows os, --prefix flag doesn't work, it behaves really weird , instead of installing the package.json fromm the prefix folder, // it's installing package.json (placed in current working directory of process) into prefix directory, so - let originalDir = process.cwd() - if(os.platform() === 'win32') { - process.chdir(manifestDir) - } + let originalDir = process.cwd() + if(os.platform() === 'win32') { + process.chdir(manifestDir) + } execSync(`${handleSpacesInPath(npm)} i --package-lock-only --prefix ${handleSpacesInPath(manifestDir)}`, err => { if (err) { throw new Error('failed to create npmOutput list') } }) - if(os.platform() === 'win32') { - process.chdir(originalDir) - } + if(os.platform() === 'win32') { + process.chdir(originalDir) + } } } export default { isSupported, provideComponent, provideStack, npmInteractions } diff --git a/src/providers/python_controller.js b/src/providers/python_controller.js index 51cf659..6ca1136 100644 --- a/src/providers/python_controller.js +++ b/src/providers/python_controller.js @@ -65,18 +65,18 @@ export default class Python_controller { this.pathToPipBin = path.join(path.sep,this.pythonEnvDir,os.platform() === 'win32' ? "Scripts" : "bin",this.#decideIfWindowsOrLinuxPath("pip3")) this.pathToPythonBin = path.join(path.sep,this.pythonEnvDir,os.platform() === 'win32' ? "Scripts" : "bin",this.#decideIfWindowsOrLinuxPath("python3")) if(os.platform() === 'win32') { - let driveLetter = path.parse(process.cwd()).root - this.pathToPythonBin = `${driveLetter}${this.pathToPythonBin.substring(1)}` - this.pathToPipBin = `${driveLetter}${this.pathToPipBin.substring(1)}` + let driveLetter = path.parse(process.cwd()).root + this.pathToPythonBin = `${driveLetter}${this.pathToPythonBin.substring(1)}` + this.pathToPipBin = `${driveLetter}${this.pathToPipBin.substring(1)}` } } else { this.pathToPipBin = path.join(path.sep,this.pythonEnvDir,os.platform() === 'win32' ? "Scripts" : "bin",this.#decideIfWindowsOrLinuxPath("pip")); this.pathToPythonBin = path.join(path.sep,this.pythonEnvDir,os.platform() === 'win32' ? "Scripts" : "bin",this.#decideIfWindowsOrLinuxPath("python")) if(os.platform() === 'win32') { - let driveLetter = path.parse(process.cwd()).root - this.pathToPythonBin = `${driveLetter}${this.pathToPythonBin.substring(1)}` - this.pathToPipBin = `${driveLetter}${this.pathToPipBin.substring(1)}` + let driveLetter = path.parse(process.cwd()).root + this.pathToPythonBin = `${driveLetter}${this.pathToPythonBin.substring(1)}` + this.pathToPipBin = `${driveLetter}${this.pathToPipBin.substring(1)}` } } // upgrade pip version to latest