Skip to content

Commit

Permalink
Use extract_json_object instead of replace
Browse files Browse the repository at this point in the history
Co-authored-by: Riccardo Porreca <[email protected]>
  • Loading branch information
maresb and riccardoporreca authored Jul 8, 2023
1 parent 9339539 commit fa8434d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions conda_lock/conda_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,7 @@ def update_specs_for_arch(
f"Could not lock the environment for platform {platform}: {err_json.get('message')}"
) from exc

conda_update_output = proc.stdout

# <https://github.com/conda/conda-lock/pull/448#issuecomment-1627530087>
conda_update_output = conda_update_output.replace(
"No package record found!", ""
)

dryrun_install: DryRunInstall = json.loads(conda_update_output)
dryrun_install: DryRunInstall = json.loads(extract_json_object(proc.stdout))
else:
dryrun_install = {"actions": {"LINK": [], "FETCH": []}}

Expand Down

0 comments on commit fa8434d

Please sign in to comment.