Skip to content
Draft
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
9 changes: 8 additions & 1 deletion src/uipath/_cli/_utils/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,14 @@ async def read_resource_overwrites_from_file(
.get("resourceOverwrites", {})
)
for key, value in resource_overwrites.items():
overwrites_dict[key] = ResourceOverwriteParser.parse(key, value)
try:
overwrites_dict[key] = ResourceOverwriteParser.parse(key, value)
except Exception as e:
logger.warning(
"Skipping unrecognized resource overwrite '%s': %s",
key,
e,
)

logger.debug(
"Loaded %d resource overwrite(s) from file %s",
Expand Down
8 changes: 4 additions & 4 deletions src/uipath/_cli/cli_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ async def execute() -> None:
JsonLinesFileExporter(ctx.trace_file)
)

async with ResourceOverwritesContext(
lambda: read_resource_overwrites_from_file(ctx.runtime_dir)
):
with ctx:
with ctx:
async with ResourceOverwritesContext(
lambda: read_resource_overwrites_from_file(ctx.runtime_dir)
):
runtime: UiPathRuntimeProtocol | None = None
chat_runtime: UiPathRuntimeProtocol | None = None
factory: UiPathRuntimeFactoryProtocol | None = None
Expand Down