Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Cannot add to environment via mmCommand

#2134

Train.mmCommand runs my command. Almost all changes I make to the file take effect as expected.

I expect:

environment = "MM_X=Y\n";

to result in a the environment variable MM_X being set to Y. However, running MailMate with debug mode on shows:

2018-10-11 21:47:22.429 MailMate[20954:2364760] performBundleItemWithUUIDString: 699BBE17-A6DF-4451-9372-A7CA48CE4468
Triggered command named “Train”
Input type is “canonical”
Environment variables:
 MM_BUNDLE_ITEM_NAME: Train
 MM_BUNDLE_ITEM_UUID: 699BBE17-A6DF-4451-9372-A7CA48CE4468
 MM_BUNDLE_SUPPORT: /Users/jeff/Library/Application Support/MailMate/Bundles/Organize.mmBundle/Support
 MM_ID: 719883
 MM_SUPPORT_PATH: /Applications/MailMate.app/Contents/SharedSupport

I'm running MailMate r5523.

Reported by Jeff Y. · October 12th, 2018 @ 04:56 AM

State: new
Milestone: none
Assigned to: benny benny

Activity

  1. benny
    benny
    • State changed from new to cantreproduce

    MailMate failed to set the environment if not in singleMessage mode (I've fixed this now), but that doesn't seem to explain your issue...

    Can you share the full .mmCommand file with me? Or at least something which reproduces the issue.

    November 21st, 2018 @ 11:09 AM

  2. Jeff Y.
    Jeff Y.

    Here's the full contents of Train.mmCommand:

    {    name = "Train";
        uuid = "699BBE17-A6DF-4451-9372-A7CA48CE4468";
        environment = "MM_X=Y\n";
        input = "canonical"; // Options are: none, raw, decoded, canonical, html, selection, formatted
        // formatString = '"${from.name:?${from.name/"/""/g}:${from.address/"/""/g}}","${from.address/"/""/g}","${subject/"/""/g}","${#mailer.name/"/""/g}",1';
        // formatString = "${from:address}\n${subject}\n${#flags.flag}\n${##tags.tag}\n${#unquoted}\n${#quoted}\n";
        output = "discard"; // Options are: discard, actions
        executionMode = "multipleMessages"; // Options are: noMessages, singleMessage, multipleMessages
        script = '#!/bin/bash\n"${MM_BUNDLE_SUPPORT}/bin/train.py"\n';
        // keyEquivalent = "^o"; // Keyboard shortcut
        // conditions = "list-id exists"; // Can be used to ensure that a command only applies to certain types of messages.
        // Other options are formatString, separatorString, suffixString, filesPattern, saveForEditing, ...
    }
    

    November 29th, 2018 @ 09:16 PM

  3. benny
    benny
    • State changed from cantreproduce to fixcommitted

    I kind of lost track on this one, but I think it's fixed in the latest test releases: Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane. (At least, I cannot reproduce it.)

    December 11th, 2018 @ 02:07 PM

  4. Jeff Y.
    Jeff Y.

    I confirm it is fixed in the latest release. Thanks! -Jeff

    Debug includes:

    MM_X: Y

    December 11th, 2018 @ 09:20 PM

  5. benny
    benny
    • State changed from fixcommitted to fixreleased

    December 13th, 2018 @ 10:59 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.