Skip to content

Invalid argument 'force' to git.latest state function #3

@devsdd

Description

@devsdd

After adding and applying this formula I get the following error:

----------
          ID: https://github.com/creationix/nvm.git
    Function: git.latest
      Result: False
     Comment: The following keyword arguments are not valid: force=True

If I remove the line

force: True

from nvm-formula/nvm/source/init.sls, I am able to apply the state without any errors.

The salt documentation for the function lists the following possible arguments starting with the word 'force':

force_checkout
: False
When checking out the local branch, the state will fail if there are unwritten changes. Set this argument to True to discard unwritten changes when checking out.
force_clone
: False
If the target directory exists and is not a git repository, then this state will fail. Set this argument to True to remove the contents of the target directory and clone the repo into it.
force_fetch
: False

If a fetch needs to be performed, non-fast-forward fetches will cause this state to fail. Set this argument to True to force the fetch even if it is a non-fast-forward update.

New in version 2015.8.0.

force_reset
: False
If the update is not a fast-forward, this state will fail. Set this argument to True to force a hard-reset to the remote revision in these cases.

It's unclear to me what the intention of the 'force: True' line is. It is also causing the state run to fail. There is already an open PR for this. Filing this issue for clarity.

Please let me know if you would like more info.

--
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions