Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Framework/install_handler/long_poll_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ async def on_message(self, message: Response) -> None:
}
)
elif action == "group_install":

user_password = ""
if message.value.item:
user_password = (
getattr(message.value.item, "user_password", "") or ""
)
await send_response(
{
"action": "group_install",
Expand All @@ -294,7 +300,14 @@ async def on_message(self, message: Response) -> None:
if i["install_function"]
]
for func in functions:
await func()
# Check if function accepts parameters
sig = inspect.signature(func)
if len(sig.parameters) > 0:
# Function accepts parameters, pass user_password
await func(user_password)
else:
# Function doesn't accept parameters, call without (backward compatibility)
await func()
await send_response(
{
"action": "group_install",
Expand Down
12 changes: 6 additions & 6 deletions Framework/install_handler/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"os": ["darwin"],
"status_function": xcode.check_status,
"install_function": xcode.install,
"user_password": "yes",
"user_password": True,
},
{
"name": "Simulator",
Expand All @@ -121,7 +121,7 @@
"os": ["darwin"],
"status_function": simulator.check_status,
"install_function": simulator.install,
"user_password": "yes",
"user_password": True,
},
],
},
Expand Down Expand Up @@ -167,7 +167,7 @@
"os": ["windows", "linux", "darwin"],
"status_function": mozilla.check_status,
"install_function": mozilla.install,
"user_password": False,
"user_password": True,
},
{
"name": "Edge",
Expand All @@ -178,7 +178,7 @@
"os": ["windows", "linux", "darwin"],
"status_function": edge.check_status,
"install_function": edge.install,
"user_password": "yes",
"user_password": True,
},
],
},
Expand All @@ -198,7 +198,7 @@
"os": ["darwin"],
"status_function": macos_xcode.check_status,
"install_function": macos_xcode.install,
"user_password": "yes",
"user_password": True,
}
],
},
Expand All @@ -219,7 +219,7 @@
"os": ["windows"],
"status_function": inspector.check_status,
"install_function": inspector.install,
"user_password": "no",
"user_password": False,
}
],
},
Expand Down
1 change: 1 addition & 0 deletions Framework/install_handler/web/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ async def _verify_edge_installation():


async def install(user_password: str = "") -> bool:

"""Main function to install Microsoft Edge"""
print("[installer][web-edge] Installing Microsoft Edge...")

Expand Down
Loading