oscope-dev / scope

Scoping user machines
https://oscope-dev.github.io/scope/
BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

Provide `working_dir` to check paths for shared configs #88

Closed noizwaves closed 7 months ago

noizwaves commented 7 months ago

Problem

Currently, the ScopeDoctorGroup action.check.paths are relative to the scope config directory they are located in. This is problematic for shared configurations (i.e. stored in /etc/scope/shared/*) which need to check application files in the current working directory.

Solution

Evaluate the path globs as templates which can access a working_dir variable.

TODO

noizwaves commented 7 months ago

@ethankhall putting this up just for some early async feedback 🙏

noizwaves commented 7 months ago

Instead of work_dir would exec_dir or cwd or current_working_dir be better?

Good point. I'm thinking working_dir is a good mix of the suggestions, and it matches the current scope flag --working-dir.

The current seems redundant, because I think there will only ever be one working directory at a time.