gitweb: do not change working directory inside actions script

This is a good practice and maybe related to commit 83337e47

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa authored and Sunil Mohan Adapa committed 2019-10-28 11:26:32 -07:00
1 parent ba9869c030
commit caa336babc
1 file changed
+4 -3
+4 -3
View File
@@ -211,11 +211,12 @@ def subcommand_repo_info(arguments):
def subcommand_create_repo(arguments):
"""Create a new git repository."""
validate_repository(arguments.name)
os.chdir(GIT_REPO_PATH)
repo_name = arguments.name + '.git'
subprocess.check_call(['git', 'init', '--bare', repo_name])
subprocess.check_call(['git', 'init', '--bare', repo_name],
cwd=GIT_REPO_PATH)
if not arguments.keep_ownership:
subprocess.check_call(['chown', '-R', 'www-data:www-data', repo_name])
subprocess.check_call(['chown', '-R', 'www-data:www-data', repo_name],
cwd=GIT_REPO_PATH)
_set_repo_description(arguments.name, arguments.description)
_set_repo_owner(arguments.name, arguments.owner)
if arguments.is_private: