mirror of
https://github.com/sasjs/lint.git
synced 2026-01-10 14:00:05 +00:00
chore(*): throw error when project root is not found
This commit is contained in:
@@ -8,5 +8,9 @@ import { lintFolder } from './lintFolder'
|
|||||||
export const lintProject = async () => {
|
export const lintProject = async () => {
|
||||||
const projectRoot =
|
const projectRoot =
|
||||||
(await getProjectRoot()) || process.projectDir || process.currentDir
|
(await getProjectRoot()) || process.projectDir || process.currentDir
|
||||||
|
|
||||||
|
if (!projectRoot) {
|
||||||
|
throw new Error('SASjs Project Root was not found.')
|
||||||
|
}
|
||||||
return await lintFolder(projectRoot)
|
return await lintFolder(projectRoot)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user