From e05c23e422c4f5b8150e31f57bdfd329b95da570 Mon Sep 17 00:00:00 2001 From: Bela Stoyan Date: Tue, 30 Jan 2024 10:13:31 +0100 Subject: [PATCH] Make sed command compatible with gsed and bsdsed --- README.md | 3 --- copier.yml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 4789d6f..5298f08 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,6 @@ This is a template for our pre-commit mirrors. -> [!WARNING] -> This template expects `sed` in your $PATH to be GNU sed. If you are on macOS, you can ensure this by running inside a conda environment with `sed` installed. - To create a new mirror, you can run the following command ```bash diff --git a/copier.yml b/copier.yml index c64f6e7..3dd27fe 100644 --- a/copier.yml +++ b/copier.yml @@ -39,6 +39,6 @@ description: default: This hook runs {{ tool }}. _tasks: - - sed -i "s/TOOL_VERSION/$(micromamba search -c conda-forge {{ conda_package }} --json | jq -r '.result.pkgs[0].version')/g" environment.yml + - sed -i.bak "s/TOOL_VERSION/$(micromamba search -c conda-forge {{ conda_package }} --json | jq -r '.result.pkgs[0].version')/g" environment.yml - git init - git branch -M main