Skip to content

Commit

Permalink
adding a secure way of calling binary
Browse files Browse the repository at this point in the history
  • Loading branch information
lovato committed Apr 8, 2019
1 parent 6a09750 commit f8271e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion hooks4git/git/hooks/hooks4git.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/bash
hooks4git -t $(basename $0)
if [ -x "$(command -v hooks4git)" ]; then
hooks4git -t $(basename $0)
fi
3 changes: 2 additions & 1 deletion hooks4git/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def add_hooks(path=os.environ["PWD"]):
src = os.path.join(setup_path, 'git/hooks', file)
target = os.path.join(git_path, 'hooks', file)
copy(src, target)
print("\nhooks4git scripts and files copied successfully! Thanks for hooking!")
print("Wow! hooks4git scripts and files were installed successfully! Thanks for hooking!")
print("If you are a courious person, take a look at .git/hooks folder.")
print("TIP: If you want to get rid of the hooks, just delete the .hooks4git.ini from your project.")
else:
if not standalone_run:
Expand Down

0 comments on commit f8271e6

Please sign in to comment.