summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2018-08-20 15:31:30 +0200
committerClément Bénier <clement.benier@iot.bzh>2018-08-20 13:38:35 +0000
commit3f460335601df39a6b43488313ac9031c8d85fe8 (patch)
tree1f79228b0ff4f499212746c61a55f571fbe17c25 /lib
parentf223efc5e5a08764cf9f78fb5f38917ed949407f (diff)
sdk force install: already installed
fix sdk Install when force boolean is true Install function was returning when sdk was already installed Change-Id: Ie8530ebe697bb66b17ac051804b42e367531134b Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
Diffstat (limited to 'lib')
-rw-r--r--lib/xdsserver/sdk.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xdsserver/sdk.go b/lib/xdsserver/sdk.go
index 88f662a..6cd2619 100644
--- a/lib/xdsserver/sdk.go
+++ b/lib/xdsserver/sdk.go
@@ -220,7 +220,7 @@ func NewCrossSDK(ctx *Context, sdk xsapiv1.SDK, scriptDir string) (*CrossSDK, er
// Install a SDK (non blocking command, IOW run in background)
func (s *CrossSDK) Install(file string, force bool, timeout int, args []string, sess *ClientSession) error {
- if s.sdk.Status == xsapiv1.SdkStatusInstalled {
+ if s.sdk.Status == xsapiv1.SdkStatusInstalled && !force {
return fmt.Errorf("already installed")
}
if s.sdk.Status == xsapiv1.SdkStatusInstalling {