{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/31414","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/31414/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/31414/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/31414/events","html_url":"https://github.com/saltstack/salt/issues/31414","id":135531638,"number":31414,"title":"salt-call on Windows can returns two different usage info","user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars.githubusercontent.com/u/994357?v=3","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-22T20:16:17Z","updated_at":"2016-02-22T20:16:17Z","closed_at":null,"body":"I'm a little puzzled by the fact that, on Windows, I get different help info when executing `salt-call.exe --help` vs a malformed salt-call, such as `salt-call event.send 'ir/tractor/reboot/minions' '{success: True, message: \"It works!\", something: false}'`.\r\n\r\nOutput of `salt-call --help`:\r\n\r\n```\r\nUsage: salt-call [options] <function> [arguments]\r\n\r\nSalt call is used to execute module functions locally on a minion\r\n\r\nOptions:\r\n  --version             show program's version number and exit\r\n  --versions-report     show program's dependencies version number and exit\r\n  -h, --help            show this help message and exit\r\n  --saltfile=SALTFILE   Specify the path to a Saltfile. If not passed, one\r\n                        will be searched for in the current working directory\r\n  -c CONFIG_DIR, --config-dir=CONFIG_DIR\r\n                        Pass in an alternative configuration directory.\r\n                        Default: c:\\salt\\conf\r\n  --args-stdin          Read additional options and/or arguments from stdin.\r\n                        Each entry is newline separated.\r\n  --hard-crash          Raise any original exception rather than exiting\r\n                        gracefully Default: False\r\n  -g, --grains          Return the information generated by the salt grains\r\n  -m MODULE_DIRS, --module-dirs=MODULE_DIRS\r\n                        Specify an additional directory to pull modules from.\r\n                        Multiple directories can be provided by passing `-m\r\n                        /--module-dirs` multiple times.\r\n  -d, --doc, --documentation\r\n                        Return the documentation for the specified module or\r\n                        for all modules if none are specified.\r\n  --master=MASTER       Specify the master to use. The minion must be\r\n                        authenticated with the master. If this option is\r\n                        omitted, the master options from the minion config\r\n                        will be used. If multi masters are set up the first\r\n                        listed master that responds will be used.\r\n  --return=RETURNER     Set salt-call to pass the return data to one or many\r\n                        returner interfaces.\r\n  --local               Run salt-call locally, as if there was no master\r\n                        running.\r\n  --file-root=FILE_ROOT\r\n                        Set this directory as the base file root.\r\n  --pillar-root=PILLAR_ROOT\r\n                        Set this directory as the base pillar root.\r\n  --retcode-passthrough\r\n                        Exit with the salt call retcode and not the salt\r\n                        binary retcode\r\n  --metadata            Print out the execution metadata as well as the\r\n                        return. This will print out the outputter data, the\r\n                        return code, etc.\r\n  --id=ID               Specify the minion id to use. If this option is\r\n                        omitted, the id option from the minion config will be\r\n                        used.\r\n  --skip-grains         Do not load grains.\r\n  --refresh-grains-cache\r\n                        Force a refresh of the grains cache\r\n  -t AUTH_TIMEOUT, --timeout=AUTH_TIMEOUT\r\n                        Change the timeout, if applicable, for the running\r\n                        command; default=60\r\n  --output-diff         Report only those states that have changed\r\n\r\n  Logging Options:\r\n    Logging options which override any settings defined on the\r\n    configuration files.\r\n\r\n    -l LOG_LEVEL, --log-level=LOG_LEVEL\r\n                        Console logging log level. One of 'all', 'garbage',\r\n                        'trace', 'debug', 'profile', 'info', 'warning',\r\n                        'error', 'critical', 'quiet'. Default: 'info'.\r\n    --log-file=LOG_FILE\r\n                        Log file path. Default: c:\\salt\\var\\log\\salt\\minion.\r\n    --log-file-level=LOG_LEVEL_LOGFILE\r\n                        Logfile logging log level. One of 'all', 'garbage',\r\n                        'trace', 'debug', 'profile', 'info', 'warning',\r\n                        'error', 'critical', 'quiet'. Default: 'info'.\r\n\r\n  Output Options:\r\n    Configure your preferred output format\r\n\r\n    --out=OUTPUT, --output=OUTPUT\r\n                        Print the output from the 'salt-call' command using\r\n                        the specified outputter. The builtins are 'key',\r\n                        'yaml', 'overstatestage', 'highstate',\r\n                        'newline_values_only', 'pprint', 'txt', 'raw',\r\n                        'virt_query', 'compact', 'json', 'nested', 'quiet',\r\n                        'no_return'.\r\n    --out-indent=OUTPUT_INDENT, --output-indent=OUTPUT_INDENT\r\n                        Print the output indented by the provided value in\r\n                        spaces. Negative values disables indentation. Only\r\n                        applicable in outputters that support indentation.\r\n    --out-file=OUTPUT_FILE, --output-file=OUTPUT_FILE\r\n                        Write the output to the specified file\r\n    --out-file-append, --output-file-append\r\n                        Append the output to the specified file\r\n    --no-color, --no-colour\r\n                        Disable all colored output\r\n    --force-color, --force-colour\r\n                        Force colored output\r\n    --state-output=STATE_OUTPUT, --state_output=STATE_OUTPUT\r\n                        Override the configured state_output value for minion\r\n                        output. One of full, terse, mixed, changes or filter.\r\n                        Default: full.\r\n    --state-verbose=STATE_VERBOSE, --state_verbose=STATE_VERBOSE\r\n                        Override the configured state_verbose value for minion\r\n                        output. Set to True or FalseDefault: True\r\n\r\n  Profiling support:\r\n    --profiling-path=PROFILING_PATH\r\n                        Folder that will hold all Stats generations path\r\n                        (/tmp/stats)\r\n    --enable-profiling  Enable generating profiling stats in /tmp/stats\r\n                        (--profiling-path)\r\n\r\nYou can find additional help about salt-call issuing \"man salt-call\" or on\r\nhttp://docs.saltstack.com\r\n```\r\n\r\n\r\nOutput of ``salt-call event.send 'ir/tractor/reboot/minions' '{success: True, message: \"It works!\", something: false}'`:\r\n\r\n```\r\nPassed invalid arguments: send() takes at most 6 arguments (11 given).\r\n\r\nUsage:\r\n\r\n    Send an event to the Salt Master\r\n\r\n    .. versionadded:: 2014.7.0\r\n\r\n    :param tag: A tag to give the event.\r\n        Use slashes to create a namespace for related events. E.g.,\r\n        ``myco/build/buildserver1/start``, ``myco/build/buildserver1/success``,\r\n        ``myco/build/buildserver1/failure``.\r\n\r\n    :param data: A dictionary of data to send in the event.\r\n        This is free-form. Send any data points that are needed for whoever is\r\n        consuming the event. Arguments on the CLI are interpreted as YAML so\r\n        complex data structures are possible.\r\n\r\n    :param with_env: Include environment variables from the current shell\r\n        environment in the event data as ``environ``.. This is a short-hand for\r\n        working with systems that seed the environment with relevant data such\r\n        as Jenkins.\r\n    :type with_env: Specify ``True`` to include all environment variables, or\r\n        specify a list of strings of variable names to include.\r\n\r\n    :param with_grains: Include grains from the current minion in the event\r\n        data as ``grains``.\r\n    :type with_grains: Specify ``True`` to include all grains, or specify a\r\n        list of strings of grain names to include.\r\n\r\n    :param with_pillar: Include Pillar values from the current minion in the\r\n        event data as ``pillar``. Remember Pillar data is often sensitive data\r\n        so be careful. This is useful for passing ephemeral Pillar values\r\n        through an event. Such as passing the ``pillar={}`` kwarg in\r\n        :py:func:`state.sls <salt.modules.state.sls>` from the Master, through\r\n        an event on the Minion, then back to the Master.\r\n    :type with_pillar: Specify ``True`` to include all Pillar values, or\r\n        specify a list of strings of Pillar keys to include. It is a\r\n        best-practice to only specify a relevant subset of Pillar data.\r\n\r\n    :param kwargs: Any additional keyword arguments passed to this function\r\n        will be interpreted as key-value pairs and included in the event data.\r\n        This provides a convenient alternative to YAML for simple values.\r\n\r\n    CLI Example:\r\n\r\n    .. code-block:: bash\r\n\r\n        salt-call event.send myco/mytag foo=Foo bar=Bar\r\n        salt-call event.send 'myco/mytag' '{foo: Foo, bar: Bar}'\r\n\r\n    A convenient way to allow Jenkins to execute ``salt-call`` is via sudo. The\r\n    following rule in sudoers will allow the ``jenkins`` user to run only the\r\n    following command.\r\n\r\n    ``/etc/sudoers`` (allow preserving the environment):\r\n\r\n    .. code-block:: text\r\n\r\n        jenkins ALL=(ALL) NOPASSWD:SETENV: /usr/bin/salt-call event.send*\r\n\r\n    Call Jenkins via sudo (preserve the environment):\r\n\r\n    .. code-block:: bash\r\n\r\n        sudo -E salt-call event.send myco/jenkins/build/success with_env=[BUILD_ID, BUILD_URL, GIT_BRANCH, GIT_COMMIT]\r\n```\r\n\r\nAlso, please note, from `salt-call --help`:\r\n\r\n> You can find additional help about salt-call issuing \"man salt-call\" or on\r\nhttp://docs.saltstack.com\r\n\r\nYou cannot run \"man\" on Windows."}}