mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 12:23:05 +00:00
Merge pull request #21133 from strapi/fix/dynamic-pkgjson-import
fix: use dynamic pkg.json import to get write pkg version during install
This commit is contained in:
commit
d4ffbfa18b
@ -3,10 +3,10 @@ import os from 'node:os';
|
||||
import chalk from 'chalk';
|
||||
import commander from 'commander';
|
||||
import crypto from 'crypto';
|
||||
import fse from 'fs-extra';
|
||||
|
||||
import * as prompts from './prompts';
|
||||
import { handleCloudLogin } from './cloud';
|
||||
import { version } from '../package.json';
|
||||
import { createStrapi } from './create-strapi';
|
||||
import { checkNodeRequirements } from './utils/check-requirements';
|
||||
import { checkInstallPath } from './utils/check-install-path';
|
||||
@ -17,6 +17,8 @@ import { addDatabaseDependencies, getDatabaseInfos } from './utils/database';
|
||||
import type { Options, Scope } from './types';
|
||||
import { logger } from './utils/logger';
|
||||
|
||||
const { version } = fse.readJSONSync(join(__dirname, '..', 'package.json'));
|
||||
|
||||
const command = new commander.Command('create-strapi-app')
|
||||
.version(version)
|
||||
.arguments('[directory]')
|
||||
|
Loading…
x
Reference in New Issue
Block a user