Skip to content

Commit

Permalink
refactor: 优化 cli 项目运行提示的环境判断
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyuWang committed Jan 3, 2025
1 parent 8936cb3 commit b812f89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite-plugin-uni/src/cli/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
output,
parseManifestJsonOnce,
parseScripts,
runByHBuilderX,
} from '@dcloudio/uni-cli-shared'

import type { CliOptions } from '.'
Expand Down Expand Up @@ -481,7 +482,7 @@ function initCustomScripts(options: CliOptions) {
}

export function showRunPrompt(platform: PLATFORM) {
if (!isInHBuilderX()) {
if (!runByHBuilderX()) {
const devtools = getPlatformDevtools(getOriginalPlatform(platform))
const outputDir = path.relative(
process.env.UNI_CLI_CONTEXT,
Expand Down

0 comments on commit b812f89

Please sign in to comment.