You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/03/12 11:57:57 UTC

[incubator-datalab] 01/02: [DATALAB-2091]: fixed usage of put for fabric 2 with specified modes of access and specified full destination path in put()

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 307f5e8b985dc7dd395d6fdbee7ed9d7e505dc48
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Mar 12 13:16:21 2021 +0200

    [DATALAB-2091]: fixed usage of put for fabric 2 with specified modes of access and specified full destination path in put()
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index c9f42b0..21eff12 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -607,7 +607,8 @@ def install_ungit(os_user, notebook_name, edge_ip):
             conn.run('git config --global user.name "Example User"')
             conn.run('git config --global user.email "example@example.com"')
             conn.run('mkdir -p ~/.git/templates/hooks')
-            conn.put('/root/scripts/git_pre_commit.py', '~/.git/templates/hooks/pre-commit', mode=0o755)
+            conn.put('/root/scripts/git_pre_commit.py', '/home/{}/.git/templates/hooks/pre-commit'.format(os_user))
+            conn.sudo('chmod 755 ~/.git/templates/hooks/pre-commit')
             conn.run('git config --global init.templatedir ~/.git/templates')
             conn.run('touch ~/.gitignore')
             conn.run('git config --global core.excludesfile ~/.gitignore')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org