fix(tauri.js): exit with code 1 if paths are missing, fixes #594 (#599)

This commit is contained in:
Noah Klayman 2020-05-19 17:24:08 -07:00 committed by GitHub
parent 4b54cc1564
commit 0c141f4922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,11 @@ const getTauriConfig = (cfg: Partial<TauriConfig>): TauriConfig => {
cfg as any
) as TauriConfig
if (!config.build.devPath || !config.build.distDir) {
error('Missing required build configuration in your tauri.conf.json file. Please make sure to add the proper path configuration as described at https://github.com/tauri-apps/tauri/wiki/05.-Tauri-Integration#src-tauritauriconfjson.')
process.exit(1)
}
const runningDevServer = config.build.devPath && config.build.devPath.startsWith('http')
if (!runningDevServer) {
config.build.devPath = appPaths.resolve.tauri(config.build.devPath)