Skip to contentSkip to conversation

toaster: trim build target input

PATCH New David Reyna 1 participant 1 message Jun 27, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: trim build target input

From: David Reyna <[email protected]>

Trim the entered built target value so that Toaster is not confused with no real targets nor a ghost second target.

[YOCTO #11727]

---
 bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/js/projecttopbar.js +2 -2
index 92ab2d6..69220aa 100644
@@ -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,
Signature · 1 line
1.9.1