# HG changeset patch # User Ludovic Chabant # Date 1695255586 25200 # Node ID d52beb77d1099ad8bfb68b3850f8beb3e8a27485 # Parent aa9bc7754c5dfccc90d6305ef1e2c11d346aa92b Better error message for incorrect usage of dogfood build mode diff -r aa9bc7754c5d -r d52beb77d109 esbuild.config.mjs --- a/esbuild.config.mjs Wed Sep 20 17:19:11 2023 -0700 +++ b/esbuild.config.mjs Wed Sep 20 17:19:46 2023 -0700 @@ -13,13 +13,14 @@ `; const prod = (process.argv[2] === 'production'); +const dogfood = (process.argv[2] === 'dogfood'); -var outdir = (process.argv[2] === 'dogfood' ? process.argv[3] : ''); +var outdir = (dogfood ? process.argv[3] : ''); if (outdir != undefined && outdir != '') { if (outdir.slice(-1) != '/' && outdir.slice(-1) != "\\") { outdir += '/'; } -} else { +} else if (dogfood) { throw("Please provide an output directory to put the dog food into"); }