Auto-fix formatting issues

This commit is contained in:
GitHub Action
2025-09-16 11:14:56 +00:00
parent b6be411c7a
commit 2925b2f56b
5 changed files with 39 additions and 31 deletions

View File

@@ -233,7 +233,8 @@ StartupNotify=true
};
const iconInfo = platformIconMap[platform];
const resolvedIconPath = options.icon ? path.resolve(options.icon) : null;
const exists = resolvedIconPath && (await fsExtra.pathExists(resolvedIconPath));
const exists =
resolvedIconPath && (await fsExtra.pathExists(resolvedIconPath));
if (exists) {
let updateIconPath = true;
let customIconExt = path.extname(resolvedIconPath).toLowerCase();

4
bin/options/icon.ts vendored
View File

@@ -46,7 +46,9 @@ const API_KEYS = {
import { generateSafeFilename } from '@/utils/name';
function generateIconPath(appName: string, isDefault = false): string {
const safeName = isDefault ? 'icon' : generateSafeFilename(appName).toLowerCase();
const safeName = isDefault
? 'icon'
: generateSafeFilename(appName).toLowerCase();
const baseName = safeName;
if (IS_WIN) {

10
bin/utils/name.ts vendored
View File

@@ -15,9 +15,7 @@ export function generateLinuxPackageName(name: string): string {
}
export function generateIdentifierSafeName(name: string): string {
return name
.replace(/[^a-zA-Z0-9]/g, '')
.toLowerCase();
return name.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
}
export function generateWindowsFilename(name: string): string {
@@ -28,7 +26,5 @@ export function generateWindowsFilename(name: string): string {
}
export function generateMacOSFilename(name: string): string {
return name
.replace(/[:]/g, '_')
.slice(0, 255);
}
return name.replace(/[:]/g, '_').slice(0, 255);
}