开发者

Hudson shell problems

开发者 https://www.devze.com 2023-02-09 15:47 出处:网络
I\'m trying to run the following code in hudson bash (hudson version 1.395): if [ false == false ]; then echo true; fi

I'm trying to run the following code in hudson bash (hudson version 1.395):

if [ false == false ]; then echo true; fi

If I type this in bash shell, it works (I know that false is truly a string, but I need to compare strings). However, this is hudson output:

[workspace] $ /bin/sh -xe /opt/tomcat/temp/hudson382382245103929499.sh
+ [ false == false ]
[: 1: false: unexpecte开发者_StackOverflowd operator
Finished: SUCCESS

My suspect is that hudson is not running bash. Either way, is there some way I can do this?

Thanks, Rafael


The standard equality operator is = not ==.


Probably issue with "=="

0

精彩评论

暂无评论...
验证码 换一张
取 消