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>
// 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 {