Fix cargo command not found after Rust installation

This commit is contained in:
Tw93
2025-10-13 19:41:28 +08:00
parent 3d4c018641
commit e7c10f6527
4 changed files with 120 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import chalk from 'chalk';
import prompts from 'prompts';
import { PakeAppOptions } from '@/types';
import { checkRustInstalled, installRust } from '@/helpers/rust';
import { checkRustInstalled, ensureRustEnv, installRust } from '@/helpers/rust';
import { mergeConfig } from '@/helpers/merge';
import tauriConfig from '@/helpers/tauriConfig';
import { generateIdentifierSafeName } from '@/utils/name';
@@ -77,6 +77,8 @@ export default abstract class BaseBuilder {
logger.warn('✼ See more in https://tauri.app/start/prerequisites/.');
}
ensureRustEnv();
if (!checkRustInstalled()) {
const res = await prompts({
type: 'confirm',