Closed Bug 818189 Opened 12 years ago Closed 12 years ago

GCLI: commands never receive the 'environment'

Categories

(DevTools :: General, defect)

18 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mamacdon, Assigned: mamacdon)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20121128060531

Steps to reproduce:

1. Set up GCLI similar to this:
> gcli.createDisplay({
>     environment: { foo: 42 }
> });
> gcli.addCommand({
>     name: 'test',
>     exec: function(args, context) {
>         console.log('foo is: ' + context.environment.foo);
>     }
> });

2. Run the 'test' command and inspect its output.



Actual results:

Output is
> foo is: undefined



Expected results:

Output should have been
> foo is: 42
Attached patch Proposed patch (obsolete) — Splinter Review
Here is a patch that fixes the problem. The cause was a misspelling of the 'environment' field in display.js.
Component: Untriaged → Developer Tools
Assignee: nobody → mamacdon
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #688371 - Attachment is patch: true
Attachment #688371 - Flags: review?
Attachment #688371 - Flags: review? → review?(jwalker)
Attachment #688371 - Flags: review?(jwalker) → review+
Thanks Mark.

This sounds silly, please could you tweak the patch to include a sign-off?
For details see: https://github.com/joewalker/gcli/blob/master/docs/developing-gcli.md

The short version is that the comment in the patch should include a line that says something like:
  Signed-off-by: Random J Developer <random@developer.example.org>

The beneficiary of this, bizarrely is IBM, particularly IBM's lawyers who like to know where stuff comes from.

Thanks.
Updated the patch to include a signoff.
Attachment #688371 - Attachment is obsolete: true
Thanks Mark. Merged into GCLI.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: