numtide / treefmt-nix

treefmt nix configuration
https://numtide.github.io/treefmt/
MIT License
228 stars 68 forks source link

`./examples.sh` is not portable to macOS #57

Closed srid closed 1 year ago

srid commented 1 year ago
❯ ./examples.sh                        
warning: Git tree '/Users/srid/code/treefmt-nix' is dirty
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file ... target_directory
srid commented 1 year ago

Had to,

diff --git a/examples.sh b/examples.sh
index 6aede37..5063f80 100755
--- a/examples.sh
+++ b/examples.sh
@@ -12,4 +12,4 @@ nix build ".#checks.$system.testExamples.passthru.examples"

 # Copy
 rm -f ./examples/* || true
-cp --no-preserve=mode ./result/* ./examples
+cp ./result/* ./examples

... just to have it run for #56