Skip to content

Commit 3b9adc6

Browse files
committed
fix switch command
1 parent 0906a7f commit 3b9adc6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ target/
44
pom.xml.bak
55
.DS_Store
66
.settings
7-
.classpath
7+
.classpath
8+
logs/

sofa-jarslink-parent/core-impl/runtime/src/main/java/com/alipay/sofa/jarslink/runtime/command/SwitchCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public String process() throws Throwable {
5050
String bizVersion = versionCommandOption.getArgs()[0];
5151
Biz biz = bizManagerService.getBiz(bizName, bizVersion);
5252
if (biz != null) {
53-
if (biz.getBizState() == BizState.UNRESOLVED || biz.getBizState() != BizState.RESOLVED
54-
|| biz.getBizState() != BizState.BROKEN) {
53+
if (biz.getBizState() != BizState.ACTIVATED
54+
&& biz.getBizState() != BizState.DEACTIVATED) {
5555
LOGGER.info(String.format("The specified biz's state must not be %s.",
5656
biz.getBizState()));
5757
return String

0 commit comments

Comments
 (0)