Commit 9d45f5b9 authored by Kris's avatar Kris

Pick a sane default for ETCD_PREFIX

parent bff6ee8e
...@@ -23,7 +23,11 @@ import ( ...@@ -23,7 +23,11 @@ import (
// Returns the prefix set via the ETCD_PREFIX environment variable (if any). // Returns the prefix set via the ETCD_PREFIX environment variable (if any).
func PathPrefix() string { func PathPrefix() string {
return path.Join("/", os.Getenv("ETCD_PREFIX")) pref := os.Getenv("ETCD_PREFIX")
if pref == "" {
pref = "registry"
}
return path.Join("/", pref)
} }
// Adds the ETCD_PREFIX to the provided key // Adds the ETCD_PREFIX to the provided key
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment