Skip to content

Commit 66d1686

Browse files
authored
fix: changes for nowsh compatibility with wsl (#1422)
The wsl largely ignores most nowsh stuff, but there are some options that can be specified for wsl. This ensures that it will still work whether or not they are set. Additionally if fixes the wsh not installed icon.
1 parent ab56540 commit 66d1686

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

frontend/app/block/blockframe.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,8 @@ const ChangeConnectionBlockModal = React.memo(
714714
}
715715
if (
716716
conn.includes(connSelected) &&
717-
connectionsConfig[conn]?.["display:hidden"] != true &&
718-
(connectionsConfig[conn]?.["conn:wshenabled"] != false || !filterOutNowsh)
717+
connectionsConfig?.[conn]?.["display:hidden"] != true &&
718+
(connectionsConfig?.[conn]?.["conn:wshenabled"] != false || !filterOutNowsh)
719719
// != false is necessary because of defaults
720720
) {
721721
filteredList.push(conn);
@@ -728,8 +728,8 @@ const ChangeConnectionBlockModal = React.memo(
728728
}
729729
if (
730730
conn.includes(connSelected) &&
731-
connectionsConfig[conn]?.["display:hidden"] != true &&
732-
(connectionsConfig[conn]?.["conn:wshenabled"] != false || !filterOutNowsh)
731+
connectionsConfig?.[conn]?.["display:hidden"] != true &&
732+
(connectionsConfig?.[conn]?.["conn:wshenabled"] != false || !filterOutNowsh)
733733
// != false is necessary because of defaults
734734
) {
735735
filteredWslList.push(conn);
@@ -842,8 +842,8 @@ const ChangeConnectionBlockModal = React.memo(
842842
(itemA: SuggestionConnectionItem, itemB: SuggestionConnectionItem) => {
843843
const connNameA = itemA.value;
844844
const connNameB = itemB.value;
845-
const valueA = connectionsConfig[connNameA]?.["display:order"] ?? 0;
846-
const valueB = connectionsConfig[connNameB]?.["display:order"] ?? 0;
845+
const valueA = connectionsConfig?.[connNameA]?.["display:order"] ?? 0;
846+
const valueB = connectionsConfig?.[connNameB]?.["display:order"] ?? 0;
847847
return valueA - valueB;
848848
}
849849
);

pkg/wsl/wsl.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func (conn *WslConn) DeriveConnStatus() wshrpc.ConnStatus {
8989
return wshrpc.ConnStatus{
9090
Status: conn.Status,
9191
Connected: conn.Status == Status_Connected,
92+
WshEnabled: true, // always use wsh for wsl connections (temporary)
9293
Connection: conn.GetName(),
9394
HasConnected: (conn.LastConnectTime > 0),
9495
ActiveConnNum: conn.ActiveConnNum,

0 commit comments

Comments
 (0)