🐛 Fix the problem of Linux retrieving remote images

This commit is contained in:
Tw93
2023-07-21 20:10:36 +08:00
parent 0a607f509a
commit 4758951064
2 changed files with 3 additions and 5 deletions

5
bin/options/icon.ts vendored
View File

@@ -2,7 +2,6 @@ import path from 'path';
import axios from 'axios';
import fsExtra from 'fs-extra';
import chalk from 'chalk';
import { dir } from 'tmp-promise';
import logger from './logger';
import { npmDirectory } from '@/utils/dir';
@@ -44,8 +43,8 @@ export async function downloadIcon(iconUrl: string) {
return null;
}
const { path: tempPath } = await dir();
const iconPath = `${tempPath}/icon.${fileDetails.ext}`;
const iconPath = `assets/icon.${fileDetails.ext}`;
await fsExtra.outputFile(`./src-tauri/${iconPath}`, iconData);
await fsExtra.outputFile(iconPath, iconData);
spinner.succeed(chalk.green('Icon downloaded successfully!'));
return iconPath;

View File

@@ -1,6 +1,6 @@
{
"name": "pake-cli",
"version": "2.2.1",
"version": "2.2.2",
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
"engines": {
"node": ">=16.0.0"
@@ -59,7 +59,6 @@
"prompts": "^2.4.2",
"psl": "^1.9.0",
"shelljs": "^0.8.5",
"tmp-promise": "^3.0.3",
"update-notifier": "^6.0.2"
},
"devDependencies": {