devbox icon indicating copy to clipboard operation
devbox copied to clipboard

[Minor] Generate readme should not expand env variables paths

Open ghost opened this issue 1 year ago • 1 comments

What happened?

If you enable the postgresql plugin, it sets some environment variables.

When you generate the readme with devbox generate readme, those variables are expanded revealing the full path of the person who run the command.

For example, I could end up with this in the readme:

PGDATA="/home/carloratm/ooo/oha/.devbox/virtenv/postgresql/data"
PGHOST="/home/carloratm/ooo/oha/.devbox/virtenv/postgresql"

If it is possible, I would like to see

PGDATA: "{{ .Virtenv }}/data",
PGHOST: "{{ .Virtenv }}"

I am not entirely sure this is a nice solution, but the user absolute path doesn't look nice either.

Any thoughts?

Steps to reproduce

  1. Enable the postgresql plugin (or any other that sets env variables)
  2. Generate the readme with `devbox generate readme

Command

generate

devbox.json

No response

Devbox version

0.12.0

Nix version

No response

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response

ghost avatar Jul 02 '24 07:07 ghost