air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.53k stars 779 forks source link

Won't exclude_dir for stuff that i don't have permission (eg. volume from docker that bind on project directory) #456

Closed kokizzu closed 11 months ago

kokizzu commented 11 months ago

How to reproduce:

mkdir tmp
mkdir -p tmpdb/var_lib_clickhouse/access
sudo chown -Rv systemd-resolve:systemd-resolve tmpdb/var_lib_clickhouse

ls -al
drwxr-xr-x 15 systemd-resolve systemd-journal 4096 Aug 22 00:43 .
drwxr-xr-x  5 root            root            4096 Aug 22 00:43 ..
drwxr-x---  2 systemd-resolve systemd-journal 4096 Aug 22 00:39 access

air.toml

root = "."

[build]
include_ext = ['go']
exclude_regex = ['_test.go','tmpdb.*']
exclude_dir = ['backup', 'tmp', 'tmpdb']
delay = 400

try air

air
...
!exclude tmp
watching tmpdb
watching tmpdb/opt_tarantool
watching tmpdb/var_lib_clickhouse
failed to watch /home/asd/go/src/P/xyz/tmpdb/var_lib_clickhouse/access, error: permission denied

Expectation, it should exclude tmpdb and allow air to be started

kokizzu commented 11 months ago

my bad, it should be .air.toml not air.toml