Skip to content

Commit

Permalink
Draft post: Conda updated?
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkapur committed Dec 4, 2024
1 parent fed2bba commit 71ab775
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions _posts/2050-12-03-conda-updated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: post
title: Conda updated?
---

Using a tip from
[Travis Hathaway](https://github.com/conda/conda/issues/14418#issuecomment-2513806325),
here is a shell one-liner to check if a conda environment is up to date:

```shell
conda update --all --dry-run --json | jq -e '.success and (.actions | length) == 0'
```

It exits (`-e`) with `0` if the environment is already updated and `1` if
updates are available.

I use this in CI so that I get an email if my `environment.yml` file is holding
any packages back.

0 comments on commit 71ab775

Please sign in to comment.