diff --git a/.travis.yml b/.travis.yml index 774d48c..211962b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,24 @@ -language: python sudo: required +language: python +python: + - "3.4" + - "3.6" install: - - sudo apt install devscripts dh-make -y + # Install build tools and ack-grep for checks + - sudo apt install devscripts dh-make ack-grep -y script: - - debuild -i -us -uc -b - - sudo apt install ../*.deb -y - - sudo howdy help - - sudo howdy list - - sudo apt purge howdy -y + # Build the binary (.deb) + - debuild -i -us -uc -b + # Install the binary, also fireing the debian scripts + - sudo apt install ../*.deb -y + # Check if the username passthough works correctly with sudo + - 'howdy | ack-grep --passthru --color "current active user: travis"' + - 'sudo howdy | ack-grep --passthru --color "current active user: travis"' + - sudo howdy list + # Remove howdy from the installation + - sudo apt purge howdy -y notifications: email: diff --git a/debian/prerm b/debian/prerm index 62f4552..542a63c 100755 --- a/debian/prerm +++ b/debian/prerm @@ -12,6 +12,7 @@ def col(id): # Import required modules import subprocess import sys +import os # Only run when we actually want to remove if "remove" not in sys.argv and "purge" not in sys.argv: diff --git a/src/cli.py b/src/cli.py index 203a455..05d0796 100755 --- a/src/cli.py +++ b/src/cli.py @@ -49,13 +49,14 @@ parser.add_argument("-h", "--help", help="Show this help message and exit.") if len(sys.argv) < 2: - parser.print_help() - sys.exit(0) + print("current active user: " + user + "\n") + parser.print_help() + sys.exit(0) args = parser.parse_args() print(args) -sys.exit(1) +sys.exit(0) # Check if if a command has been given and print help otherwise if (len(sys.argv) < 2):