devbox
devbox copied to clipboard
Feature Request: Allow User To Specific Name Of Config File
if I change the name of devbox.json to something else then devbox shell throws an error:
Error: open devbox.json: no such file or directory
Usage:
devbox shell [<dir>] [flags]
Flags:
-h, --help help for shell
But I'd like to have files for specific tasks - like editing pdfs - and want to use the filename as a guide, ex: devbox_pdf.json. It would be good to have that option.
Interesting idea!
@gfleetwood Are you looking to do something like this?
devbox shell file1.json # Uses file1.json instead of `devbox.json`
Exactly. devbox shell can default to looking for devbox.json but I should be able to supply a file name as well.
Maybe changing this line by : https://github.com/jetpack-io/devbox/blob/930867bf4e84f370b4c42a9797a7ee85821f8483/devbox.go#L22-L23
// configFilename is name of the JSON file that defines a devbox environment.
// it can be set by DEVBOX_CONFIG env var or falling back to devbox.json
val, ok := os.LookupEnv(key)
if !ok {
val = "devbox.json"
}
const configFilename = val