Skip to content

Commit 1e16541

Browse files
committed
Set func path only if its not empty
1 parent 60f49f4 commit 1e16541

File tree

1 file changed

+5
-3
lines changed
  • PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/src/com/microsoft/azure/toolkit/eclipse/function/launch/deploy

1 file changed

+5
-3
lines changed

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/src/com/microsoft/azure/toolkit/eclipse/function/launch/deploy/AzureFunctionDeployComposite.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import com.microsoft.azure.toolkit.eclipse.function.utils.FunctionUtils;
3232
import com.microsoft.azure.toolkit.ide.appservice.function.FunctionAppConfig;
3333
import com.microsoft.azure.toolkit.lib.common.form.AzureFormInput;
34-
import com.microsoft.azure.toolkit.lib.common.messager.AzureMessager;
3534

3635
public class AzureFunctionDeployComposite extends Composite implements AzureFormPanel<FunctionDeployConfiguration> {
3736
private FunctionProjectComboBox cbProject;
@@ -125,9 +124,12 @@ public void setValue(FunctionDeployConfiguration config) {
125124
txtFunctionCli.setValue(config.getFunctionCliPath());
126125
} else {
127126
try {
128-
txtFunctionCli.setValue(FunctionUtils.getFuncPath());
127+
final String funcPath = FunctionUtils.getFuncPath();
128+
if (StringUtils.isNotBlank(funcPath)) {
129+
txtFunctionCli.setValue(funcPath);
130+
}
129131
} catch (IOException | InterruptedException e) {
130-
AzureMessager.getMessager().warning("Cannot find function core tools due to error:" + e.getMessage());
132+
// swallow exception for default value
131133
}
132134
}
133135
Optional.ofNullable(config.getFunctionConfig()).ifPresent(functionAppConfig -> {

0 commit comments

Comments
 (0)