~james-page/ubuntu/wily/juju-core/mir-fixes

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/cmd/juju/main.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-03-28 08:58:42 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20140328085842-cyzrgc120bdfxwj0
Tags: 1.17.7-0ubuntu1
* New upstream point release, including fixes for:
  - no debug log with all providers on Ubuntu 14.04 (LP: #1294776).
* d/control: Add cpu-checker dependency to juju-local (LP: #1297077).

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
// to the cmd package. This function is not redundant with main, because it
34
34
// provides an entry point for testing with arbitrary command line arguments.
35
35
func Main(args []string) {
36
 
        if err := juju.InitJujuHome(); err != nil {
 
36
        ctx, err := cmd.DefaultContext()
 
37
        if err != nil {
 
38
                fmt.Fprintf(os.Stderr, "error: %v\n", err)
 
39
                os.Exit(2)
 
40
        }
 
41
        if err = juju.InitJujuHome(); err != nil {
37
42
                fmt.Fprintf(os.Stderr, "error: %s\n", err)
38
43
                os.Exit(2)
39
44
        }
93
98
        jujucmd.Register(wrap(&ResolvedCommand{}))
94
99
        jujucmd.Register(wrap(&DebugLogCommand{sshCmd: &SSHCommand{}}))
95
100
        jujucmd.Register(wrap(&DebugHooksCommand{}))
 
101
        jujucmd.Register(wrap(&RetryProvisioningCommand{}))
96
102
 
97
103
        // Configuration commands.
98
104
        jujucmd.Register(wrap(&InitCommand{}))
103
109
        jujucmd.Register(wrap(&SetConstraintsCommand{}))
104
110
        jujucmd.Register(wrap(&GetEnvironmentCommand{}))
105
111
        jujucmd.Register(wrap(&SetEnvironmentCommand{}))
 
112
        jujucmd.Register(wrap(&UnsetEnvironmentCommand{}))
106
113
        jujucmd.Register(wrap(&ExposeCommand{}))
107
114
        jujucmd.Register(wrap(&SyncToolsCommand{}))
108
115
        jujucmd.Register(wrap(&UnexposeCommand{}))
121
128
        // Common commands.
122
129
        jujucmd.Register(wrap(&cmd.VersionCommand{}))
123
130
 
124
 
        os.Exit(cmd.Main(jujucmd, cmd.DefaultContext(), args[1:]))
 
131
        os.Exit(cmd.Main(jujucmd, ctx, args[1:]))
125
132
}
126
133
 
127
134
// wrap encapsulates code that wraps some of the commands in a helper class