Skip to content

Commit

Permalink
🐛 fix download icon
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Aug 28, 2023
1 parent e246bcf commit b5ad835
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions script/build_with_pake_cli.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import shelljs from 'shelljs';
import axios from 'axios';
import fs from 'fs';
import os from 'os';
import { fileURLToPath } from 'url';
import path, { dirname } from 'path';

Expand Down Expand Up @@ -31,19 +30,19 @@ let params = `node cli.js ${process.env.URL} --name ${process.env.NAME}`;
// Download Icons
if (process.env.ICON && process.env.ICON !== '') {
let iconFile;
switch (os.type()) {
case 'Linux':
switch (process.platform) {
case 'linux':
iconFile = 'icon.png';
break;
case 'Darwin':
case 'darwin':
iconFile = 'icon.icns';
break;
case 'Windows_NT':
case 'win32':
iconFile = 'icon.ico';
break;
default:
console.log("Unable to detect your OS system, won't download the icon!");
return;
process.exit(1);
}

axios
Expand Down

0 comments on commit b5ad835

Please sign in to comment.