Formatting
This commit is contained in:
@@ -157,10 +157,8 @@
|
|||||||
|
|
||||||
- name: Initialize Git if needed and configure
|
- name: Initialize Git if needed and configure
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
# Check if we're in a git repo, if not try to find the actual project directory
|
|
||||||
if [ ! -d ".git" ]; then
|
if [ ! -d ".git" ]; then
|
||||||
echo "Not in a git repository, checking for git in parent directories"
|
echo "Not in a git repository, checking for git in parent directories"
|
||||||
# Try to find the git root
|
|
||||||
git_root=$(git rev-parse --show-toplevel 2>/dev/null || echo "")
|
git_root=$(git rev-parse --show-toplevel 2>/dev/null || echo "")
|
||||||
if [ -n "$git_root" ]; then
|
if [ -n "$git_root" ]; then
|
||||||
cd "$git_root"
|
cd "$git_root"
|
||||||
|
Reference in New Issue
Block a user