mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
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:
parent
ba9869c030
commit
caa336babc
@ -211,11 +211,12 @@ def subcommand_repo_info(arguments):
|
|||||||
def subcommand_create_repo(arguments):
|
def subcommand_create_repo(arguments):
|
||||||
"""Create a new git repository."""
|
"""Create a new git repository."""
|
||||||
validate_repository(arguments.name)
|
validate_repository(arguments.name)
|
||||||
os.chdir(GIT_REPO_PATH)
|
|
||||||
repo_name = arguments.name + '.git'
|
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:
|
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_description(arguments.name, arguments.description)
|
||||||
_set_repo_owner(arguments.name, arguments.owner)
|
_set_repo_owner(arguments.name, arguments.owner)
|
||||||
if arguments.is_private:
|
if arguments.is_private:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user