Skip to content

Make some env vars optional for easier dev setup #470

Closed
@carols10cents

Description

@carols10cents

Right now cargo_registry::env panics if there isn't a value set for an env var, so you can't run the server locally unless you set values for everything in .env.

If you're just working on part of the backend that you don't need users logged in for, there's no reason to have to set up github tokens and all that.

I tried to make this easier to set up by setting the values in .env.sample to "", which gets around the panic, but apparently that caused problems with zsh.

I think it'd be better to have another function, like env_with_default or something, and maybe warn that functionality that needs that env var isn't going to work?

I'm happy to do this, just not right this second, so I wanted to open this to remind me (and maybe entice someone else to do it, i don't think it would be very hard #famouslastwords)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancement ✨Category: Adding new behavior or a change to the way an existing feature works

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions