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

CPK fails when there is no git HEAD #18

Open
mrwalter opened this issue Dec 16, 2021 · 0 comments
Open

CPK fails when there is no git HEAD #18

mrwalter opened this issue Dec 16, 2021 · 0 comments

Comments

@mrwalter
Copy link

cpk|    INFO : CPK - Code Packaging toolKit - v0.1.1
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Traceback (most recent call last):
  File "/home/ripl/anaconda3/bin/cpk", line 6, in <module>
    run()
  File "/home/ripl/anaconda3/lib/python3.8/site-packages/cpk/cli/main.py", line 66, in run
    command.execute(machine, parsed)
  File "/home/ripl/anaconda3/lib/python3.8/site-packages/cpk/cli/commands/build.py", line 126, in execute
    project = CPKProject(parsed.workdir, parsed=parsed)
  File "/home/ripl/anaconda3/lib/python3.8/site-packages/cpk/project.py", line 46, in __init__
    30: GitRepositoryAdapter(self._path),
  File "/home/ripl/anaconda3/lib/python3.8/site-packages/cpk/adapters/git.py", line 13, in __init__
    self._repo = get_repo_info(self._path)
  File "/home/ripl/anaconda3/lib/python3.8/site-packages/cpk/utils/git.py", line 16, in get_repo_info
    sha = run_cmd(["git", "--git-dir", f'"{path}"',
  File "/home/ripl/anaconda3/lib/python3.8/site-packages/cpk/utils/misc.py", line 17, in run_cmd
    lines = subprocess.check_output(cmd, shell=True).decode("utf-8").split("\n")
  File "/home/ripl/anaconda3/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/ripl/anaconda3/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git --git-dir "/home/ripl/code/test-project/.git" rev-parse HEAD' returned non-zero exit status 128.
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