Skip to content

Commit

Permalink
Fix gh_deploy with config-file in the current directory (#2481)
Browse files Browse the repository at this point in the history
If the config file is specified as relative and is in the current directory, the `dirname` transform came out empty, which `subprocess` doesn't like as `cwd`.
  • Loading branch information
oprypin committed Jul 5, 2021
1 parent c1f6221 commit f8b9e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkdocs/commands/gh_deploy.py
Expand Up @@ -29,7 +29,7 @@ def _is_cwd_git_repo():

def _get_current_sha(repo_path):

proc = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], cwd=repo_path,
proc = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], cwd=repo_path or None,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)

stdout, _ = proc.communicate()
Expand Down

0 comments on commit f8b9e96

Please sign in to comment.