-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |