1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

Merge pull request #10587 from Budibase/fix/cli-version-issue

Removing version error breaking CLI
This commit is contained in:
Michael Drury 2023-05-15 16:43:03 +01:00 committed by GitHub
commit a94cb0e7bf

View file

@ -69,10 +69,10 @@ function findVersion() {
try {
const packageJsonFile = findFileInAncestors("package.json", process.cwd())
const content = readFileSync(packageJsonFile!, "utf-8")
const version = JSON.parse(content).version
return version
return JSON.parse(content).version
} catch {
throw new Error("Cannot find a valid version in its package.json")
// throwing an error here is confusing/causes backend-core to be hard to import
return undefined
}
}