Skip to content

Commit

Permalink
fix: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
csansoon committed Jun 10, 2024
1 parent 71856c4 commit b760379
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/cli/core/src/lib/versionManagement/appVersion.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { readFileSync } from 'fs'
import { APP_FOLDER, DEFAULT_VERSION_LIST, PACKAGE_NAME } from '../../commands/constants'
import {
APP_FOLDER,
DEFAULT_VERSION_LIST,
PACKAGE_NAME,
} from '../../commands/constants'
import getPackageVersions from './getPackageVersions'

export function getInstalledVersion(rootDir: string): string | null {
try {
const packageJson = readFileSync(`${rootDir}/${APP_FOLDER}/package.json`, 'utf-8')
const packageJson = readFileSync(
`${rootDir}/${APP_FOLDER}/package.json`,
'utf-8',
)
return JSON.parse(packageJson).version
} catch (e) {
// Do nothing
Expand Down

0 comments on commit b760379

Please sign in to comment.