Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswilm committed Oct 24, 2024
1 parent e1d3c24 commit 73c14c4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lint/django_import_resolver.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
const path = require("path")
const fs = require("fs")
const acorn = require("acorn")
const { execSync } = require('child_process')
const {execSync} = require("child_process")

function getFidusWriterPath() {
try {
return execSync(
'python -c "import fiduswriter; print(next(filter(lambda path: \'/site-packages/\' in path, fiduswriter.__path__), \'\'))"'
).toString().trim()
"python -c \"import fiduswriter; print(next(filter(lambda path: '/site-packages/' in path, fiduswriter.__path__), ''))\""
)
.toString()
.trim()
} catch (error) {
console.error('Failed to find Fidus Writer installation:', error.message)
console.error(
"Failed to find Fidus Writer installation:",
error.message
)
process.exit(1)
}
}
Expand Down Expand Up @@ -48,9 +53,7 @@ function resolveFilelocation(source, file, appsPaths) {
const returnValue = {found: false, path: null}
const fullPath = path.resolve(path.dirname(file), source)

if (
fullPath.includes("/plugins/")
) {
if (fullPath.includes("/plugins/")) {
returnValue.found = true
returnValue.path = null
return returnValue
Expand Down

0 comments on commit 73c14c4

Please sign in to comment.