"juju init" creates a file that includes comments recommending -e to switch environments

Bug #1221134 reported by Tom Haddon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Dimiter Naydenov

Bug Description

This is taken from a pristine .juju/environments.yaml file created with "juju init":

## The default environment is chosen when one is not specified using either:
## -e, --environment command line parameter
## JUJU_ENV environment variable
## If both -e and JUJU_ENV are specified, the command line parameter has precedence.

However, if you try juju -e you get "error: flag provided but not defined: -e"

Related branches

Revision history for this message
Tom Haddon (mthaddon) wrote :

<mgz> commands where having an environment makes sense should interpret -e
<mthaddon> mgz: how so?
<mthaddon> mthaddon@mallory:~$ juju -e amazon status
<mthaddon> error: flag provided but not defined: -e
<mgz> hm, maybe it's only registered as a normal flag now, after the plugin changes... I take it `juju status -e amazon` works?
<mthaddon> ah, yeah, it does, will update the bug report

Curtis Hovey (sinzui)
affects: juju → juju-core
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → Low
tags: added: doc ui
Curtis Hovey (sinzui)
tags: added: docs
removed: doc
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Dimiter Naydenov (dimitern)
milestone: none → 1.17.5
Curtis Hovey (sinzui)
tags: added: regression
Changed in juju-core:
importance: Low → High
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1221134] Re: "juju init" creates a file that includes comments recommending -e to switch environments

I don't think this is a regression, it is just that the position of -e
is required to be after the command.

juju bootstrap -e FOO
not
juju -e FOO bootstrap

I'm not sure how to fix this in the init docs.

On Mon, Mar 10, 2014 at 8:01 PM, Curtis Hovey <email address hidden> wrote:
> ** Tags added: regression
>
> ** Changed in: juju-core
> Importance: Low => High
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1221134
>
> Title:
> "juju init" creates a file that includes comments recommending -e to
> switch environments
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1221134/+subscriptions

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

In the linked branch I've clarified the way to pass -e envName in the generated boilerplate code. So I can close this once it lands.

If the ability to pass -e env both before or after the command is needed, let's open another bug for it.

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.