Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-state errors out when run from a non-git directory #13

Closed
Brickster opened this issue Aug 12, 2015 · 0 comments
Closed

git-state errors out when run from a non-git directory #13

Brickster opened this issue Aug 12, 2015 · 0 comments

Comments

@Brickster
Copy link
Owner

$ git state
error: could not lock config file .git/config: No such file or directory
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
  File "/Users/Marcus/Development/bash/git-commands/bin/git-state", line 232, in <module>
    main()
  File "/Users/Marcus/Development/bash/git-commands/bin/git-state", line 229, in main
    state.state(**vars(parser.parse_args()))
  File "/Users/Marcus/Development/bash/git-commands/bin/commands/state.py", line 119, in state
    status = check_output(['git', 'status', '--short', '--untracked-files=all', '--branch']).splitlines()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['git', 'status', '--short', '--untracked-files=all', '--branch']' returned non-zero exit status 128
Brickster added a commit that referenced this issue Jan 8, 2018
If `git state` was used from a non-Git directory then an error was raised.

Fixes #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant