From: David Reyna Date: Tue, 11 Jul 2017 21:56:10 +0000 (-0700) Subject: bitbake: toaster: trim build target input X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=882e85cd83affed95b747473b248aba99ccd25d6;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: trim build target input Trim the entered built target value so that Toaster is not confused with no real targets nor a ghost second target. [YOCTO #11727] (Bitbake rev: dd83c732b945ba6f9b7cdf66f6e88cfd15a745a0) Signed-off-by: David Reyna Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js index 92ab2d67fd2..69220aaf572 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js +++ b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js @@ -73,14 +73,14 @@ function projectTopBarInit(ctx) { newBuildTargetBuildBtn.click(function (e) { e.preventDefault(); - if (!newBuildTargetInput.val()) { + if (!newBuildTargetInput.val().trim()) { return; } /* We use the value of the input field so as to maintain any command also * added e.g. core-image-minimal:clean and because we can build targets * that toaster doesn't yet know about */ - selectedTarget = { name: newBuildTargetInput.val() }; + selectedTarget = { name: newBuildTargetInput.val().trim() }; /* Fire off the build */ libtoaster.startABuild(null, selectedTarget.name,