From 0c141f4922964617539822dcd9589eccc3146cf6 Mon Sep 17 00:00:00 2001 From: Noah Klayman Date: Tue, 19 May 2020 17:24:08 -0700 Subject: [PATCH] fix(tauri.js): exit with code 1 if paths are missing, fixes #594 (#599) --- cli/tauri.js/src/helpers/tauri-config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/tauri.js/src/helpers/tauri-config.ts b/cli/tauri.js/src/helpers/tauri-config.ts index f3c90b575..df1bbd564 100644 --- a/cli/tauri.js/src/helpers/tauri-config.ts +++ b/cli/tauri.js/src/helpers/tauri-config.ts @@ -64,6 +64,11 @@ const getTauriConfig = (cfg: Partial): 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)