mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
add special case for conda activate/deactivate as well to rtnstate detection
This commit is contained in:
parent
8d71f5538c
commit
f2eb383cc3
@ -241,6 +241,12 @@ func isRtnStateCmd(cmd syntax.Command) bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if arg0 == "conda" {
|
||||
arg1 := getCallExprLitArg(callExpr, 1)
|
||||
if arg1 == "activate" || arg1 == "deactivate" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
} else if _, ok := cmd.(*syntax.DeclClause); ok {
|
||||
return true
|
||||
}
|
||||
|
@ -60,4 +60,9 @@ func TestIsReturnStateCommand(t *testing.T) {
|
||||
testRSC(t, ". ./test", true)
|
||||
testRSC(t, "{ FOO=6; }", true)
|
||||
testRSC(t, "cd foo && ls -l", true)
|
||||
testRSC(t, "ls -l && ./foo || git checkout main", true)
|
||||
testRSC(t, "./foo || ./bar", false)
|
||||
testRSC(t, ". foo.sh", true)
|
||||
testRSC(t, "cd work; conda activate myenv", true)
|
||||
testRSC(t, "asdf foo", true)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user