UMM-CSci-Systems / Command-line-introduction

An introduction to Unix command line tools
MIT License
0 stars 14 forks source link

Lab docs should clarify that cleaning tests will fail on Apple (BSD) devices #26

Open stanislowskij opened 1 month ago

stanislowskij commented 1 month ago

This has been a known issue for a while.

cleaning/bats_tests.sh contains an assertion on line 167 that calls grep with the -P flag, which is an invalid flag in MacOS since it is using a BSD version of grep. See: https://stackoverflow.com/questions/77662026/grep-invalid-option-p-error-when-doing-regex-in-bash-script

167    run bash -c "tar -ztf cleaned_$little.tgz | grep -P 'little_dir/file_\d+$' | wc -l"

There are a few solutions to this, but the easiest might be to just clarify that this happens, and encourage students to update their tooling using brew or do their work on the lab computers.