mirror of
https://github.com/desktop/desktop
synced 2024-10-02 14:23:59 +00:00
fix the compiler warnings
This commit is contained in:
parent
bbab6f36e5
commit
8110a3bb19
|
@ -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'),
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue