yadm-dev / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
5.15k stars 176 forks source link

Pass parameters on to the bootstrap script #403

Closed jannewulf closed 2 years ago

jannewulf commented 2 years ago

Is your feature request related to a problem? Please describe.

My bootstrap script expects parameters. However, parameters like yadm bootstrap -u are not passed to the bootstrap script.

Describe the solution you'd like

In the bootstrap function change the line:

exec "$YADM_BOOTSTRAP"

to

exec "$YADM_BOOTSTRAP" "$@"

I can create a pull request if you like this.

MenacingPerson commented 2 years ago
exec "$YADM_BOOTSTRAP" "$@"

I think this should be exec "$YADM_BOOTSTRAP" $@, otherwise bash won't do var splitting

TheLocehiliosan commented 2 years ago

I think this will have implications on how bootstrap is performed automatically (upon clone).

Have you considered passing parameters to the bootstrap via environment? Like this:

x=y a=b yadm bootstrap

Which will also work for bootstrap run during clone.

jannewulf commented 2 years ago

Yeah that makes sense. Environment variables might be a cleaner way here.

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been labeled as stale for 7 days with no activity.