~rogpeppe/juju-core/themue-058-debug-log-api

« back to all changes in this revision

Viewing changes to cmd/environmentcommand.go

  • Committer: Frank Mueller
  • Date: 2014-01-23 14:14:49 UTC
  • mfrom: (2152.1.95 juju-core)
  • Revision ID: frank.mueller@canonical.com-20140123141449-b30l57y7gs3wjkpw
debugger: merged trunk and fixed permission and interface problems

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
        "launchpad.net/gnuflag"
14
14
 
15
 
        "launchpad.net/juju-core/environs/config"
16
15
        "launchpad.net/juju-core/juju/osenv"
17
16
)
18
17
 
26
25
}
27
26
 
28
27
func getCurrentEnvironmentFilePath() string {
29
 
        return filepath.Join(config.JujuHome(), CurrentEnvironmentFilename)
 
28
        return filepath.Join(osenv.JujuHome(), CurrentEnvironmentFilename)
30
29
}
31
30
 
32
31
// Read the file $JUJU_HOME/current-environment and return the value stored
56
55
// JUJU_ENV environment variable.  If that is set, it gets used.  If it isn't
57
56
// set, look in the $JUJU_HOME/current-environment file.
58
57
func getDefaultEnvironment() string {
59
 
        defaultEnv := os.Getenv(osenv.JujuEnv)
 
58
        defaultEnv := os.Getenv(osenv.JujuEnvEnvKey)
60
59
        if defaultEnv != "" {
61
60
                return defaultEnv
62
61
        }