Skip to content

Commit

Permalink
fix the compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Forster committed Jun 22, 2018
1 parent bbab6f3 commit 8110a3b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 9 additions & 1 deletion script/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,18 @@ function packageApp(
)
}

const toPackageArch = (targetArch: string | undefined): packager.arch => {
if (targetArch === 'arm64' || targetArch === 'x64') {
return targetArch
}

return 'x64'
}

const options: packager.Options & IPackageAdditionalOptions = {
name: getExecutableName(),
platform: toPackagePlatform(process.platform),
arch: process.env.TARGET_ARCH || 'x64',
arch: toPackageArch(process.env.TARGET_ARCH),
asar: false, // TODO: Probably wanna enable this down the road.
out: getDistRoot(),
icon: path.join(projectRoot, 'app', 'static', 'logos', 'icon-logo'),
Expand Down
8 changes: 7 additions & 1 deletion script/review-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ import { getExecutableName } from './dist-info'

function getUserDataPath() {
if (process.platform === 'win32') {
return path.join(process.env.APPDATA, getExecutableName())
if (process.env.APPDATA) {
return path.join(process.env.APPDATA, getExecutableName())
} else {
throw new Error(
`Unable to find the application data directory on Windows :(`
)
}
} else if (process.platform === 'darwin') {
const home = os.homedir()
return path.join(home, 'Library', 'Application Support', getProductName())
Expand Down

0 comments on commit 8110a3b

Please sign in to comment.