Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document passing host paths to scripts #224

Open
vito opened this issue Aug 7, 2022 · 0 comments
Open

document passing host paths to scripts #224

vito opened this issue Aug 7, 2022 · 0 comments
Labels
docs Improvements or additions to documentation

Comments

@vito
Copy link
Owner

vito commented Aug 7, 2022

Current recommended practice is to accept paths as inputs:

(for [{:src src} *stdin*]

And then run with ./bass/test -i src=./. Bass automatically parses ./ into a proper host path. The nice thing about this approach is the script could be fed other types of paths as JSON on stdin, and it also doesn't matter where the Bass scripts run from - you can tuck them all under bass/ instead of needing to put a script in the repo root and use *dir*.

Worth noting the *dir* binding should really only ever be used for loading Bass modules. It shouldn't be used as a shortcut for referencing source code, since that'll make it way to easy to accidentally introduce non-reproducible state into your build. That's what happened with the earlier releases of Bass (maybe it was v0.1.0?).

@vito vito added the docs Improvements or additions to documentation label Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant