Review Request 119285: Fix Empty String Test in kdevelop! Shell Script

Kevin Funk kfunk at kde.org
Tue Jul 15 08:17:46 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119285/#review62379
-----------------------------------------------------------


kdevelop! is a sh script -- '[[' is a bash thing only.

I'd suggest the following patch, which also doesn't fail if $@ contains a hyphen as the first char.

--- a/app/kdevelop!
+++ b/app/kdevelop!
@@ -23,7 +23,7 @@ export APPLICATION=KDevelop
 
 if ! [ "$KDEV_ATTACHED_PID" ]; then
     ARGS=""
-    if [[ -z "$@" ]]; then
+    if [ $# -eq 0 ]; then
         ARGS="-pss"
     else
         ARGS="$@"
         
Feel free to commit that one if that fixes it for you, too.

- Kevin Funk


On July 15, 2014, 3:17 a.m., David Narváez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119285/
> -----------------------------------------------------------
> 
> (Updated July 15, 2014, 3:17 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Bugs: 337454
>     http://bugs.kde.org/show_bug.cgi?id=337454
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> This empty string test was failing and causing the linked bug.
> 
> 
> Diffs
> -----
> 
>   app/kdevelop! 35dda2d 
> 
> Diff: https://git.reviewboard.kde.org/r/119285/diff/
> 
> 
> Testing
> -------
> 
> See the steps to reproduce the linked bug.
> 
> 
> Thanks,
> 
> David Narváez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140715/6b865311/attachment.html>


More information about the KDevelop-devel mailing list