Skip to content

Unable to setup environment for pre-commit hook run: unknown switch #847

Description

@jerrygar96

Hooks fail when trying to stash changes with message

Unable to setup environment for pre-commit hook run
STDOUT:
STDERR:error: unknown switch `0'
usage: git stash save [-p | --patch] [-S | --staged]...
stash message

in stash_changes in file stash_unstaged_changes.rb changing stash_message to use Time.now.to_i instead of Time.now seems to fix the issue for me.

This issue only presents itself when not committing all changed files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions