🎨 Format Optimization
This commit is contained in:
2
bin/helpers/merge.ts
vendored
2
bin/helpers/merge.ts
vendored
@@ -197,7 +197,7 @@ export async function mergeConfig(url: string, options: PakeAppOptions, tauriCon
|
||||
logger.error('The injected file must be in either CSS or JS format.');
|
||||
return;
|
||||
}
|
||||
const files = inject.map(filepath => path.isAbsolute(filepath) ? filepath : path.join(process.cwd(), filepath));
|
||||
const files = inject.map(filepath => (path.isAbsolute(filepath) ? filepath : path.join(process.cwd(), filepath)));
|
||||
tauriConf.pake.inject = files;
|
||||
await combineFiles(files, injectFilePath);
|
||||
} else {
|
||||
|
||||
7
bin/helpers/rust.ts
vendored
7
bin/helpers/rust.ts
vendored
@@ -9,9 +9,10 @@ import { isChinaDomain } from '@/utils/ip';
|
||||
export async function installRust() {
|
||||
const isActions = process.env.GITHUB_ACTIONS;
|
||||
const isInChina = await isChinaDomain('sh.rustup.rs');
|
||||
const rustInstallScriptForMac = isInChina && !isActions
|
||||
? 'export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" && curl --proto "=https" --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh'
|
||||
: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
|
||||
const rustInstallScriptForMac =
|
||||
isInChina && !isActions
|
||||
? 'export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" && curl --proto "=https" --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh'
|
||||
: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
|
||||
const rustInstallScriptForWindows = 'winget install --id Rustlang.Rustup';
|
||||
|
||||
const spinner = getSpinner('Downloading Rust...');
|
||||
|
||||
Reference in New Issue
Block a user