Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
8.8 kB · 255 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256diff --git a/Makefile b/Makefileindex 1ef67c8..d49031a 100644--- a/Makefile+++ b/Makefile@@ -16,5 +16,5 @@ test: kill build setup_gpg: pypass/tests/gnupg pypass/tests/gnupg: pypass/tests/test_key_sec.asc pypass/tests/test_ownertrust.txt mkdir -m 700 -p pypass/tests/gnupg- GNUPGHOME=pypass/tests/gnupg gpg --allow-secret-key-import --import pypass/tests/test_key_sec.asc- GNUPGHOME=pypass/tests/gnupg gpg --import-ownertrust pypass/tests/test_ownertrust.txt+ GNUPGHOME=pypass/tests/gnupg @gpg_exec@ --allow-secret-key-import --import pypass/tests/test_key_sec.asc+ GNUPGHOME=pypass/tests/gnupg @gpg_exec@ --import-ownertrust pypass/tests/test_ownertrust.txtdiff --git a/pypass/command.py b/pypass/command.pyindex 4616a5f..a72cf5d 100644--- a/pypass/command.py+++ b/pypass/command.py@@ -173,7 +173,7 @@ def show(config, path, clip): if clip: xclip = subprocess.Popen( [- 'xclip',+ '@xclip_exec@', '-selection', 'clipboard' ], stdin=subprocess.PIPE@@ -206,7 +206,7 @@ def connect(config, path): def ls(config, subfolder): tree = subprocess.Popen( [- 'tree',+ '@tree_exec@', '-C', '-l', '--noreport',@@ -239,7 +239,7 @@ def find(config, search_terms): tree = subprocess.Popen( [- 'tree',+ '@tree_exec@', '-C', '-l', '--noreport',@@ -273,7 +273,7 @@ def grep(config, search_string): config['password_store'].get_decrypted_password(password) grep = subprocess.Popen(- ['grep', '-e', search_string],+ ['@grep_exec@', '-e', search_string], stdout=subprocess.PIPE, stdin=subprocess.PIPE )@@ -397,7 +397,7 @@ def git(config, commands): else: subprocess.call( [- 'git',+ '@git_exec@', '--git-dir=%s' % config['password_store'].git_dir, '--work-tree=%s' % config['password_store'].path, ] + command_list,diff --git a/pypass/passwordstore.py b/pypass/passwordstore.pyindex 9de0376..8cf20a4 100644--- a/pypass/passwordstore.py+++ b/pypass/passwordstore.py@@ -26,18 +26,7 @@ import re from .entry_type import EntryType # Find the right gpg binary-if subprocess.call(- ['which', 'gpg2'],- stdout=subprocess.PIPE,- stderr=subprocess.PIPE) == 0:- GPG_BIN = 'gpg2'-elif subprocess.call(- ['which', 'gpg'],- stdout=subprocess.PIPE,- stderr=subprocess.PIPE) == 0:- GPG_BIN = 'gpg'-else:- raise Exception("Could not find GPG")+GPG_BIN = '@gpg_exec@' class PasswordStore(object):@@ -215,7 +204,7 @@ class PasswordStore(object): # Init git repo subprocess.call( [- "git",+ "@git_exec@", "--git-dir=%s" % git_dir, "--work-tree=%s" % git_work_tree, "init", path@@ -226,7 +215,7 @@ class PasswordStore(object): # Add remote repo subprocess.call( [- "git",+ "@git_exec@", "--git-dir=%s" % git_dir, "--work-tree=%s" % git_work_tree, "remote",@@ -241,7 +230,7 @@ class PasswordStore(object): # TODO: add parameters for remote and branch ? subprocess.call( [- "git",+ "@git_exec@", "--git-dir=%s" % git_dir, "--work-tree=%s" % git_work_tree, "pull",@@ -272,7 +261,7 @@ class PasswordStore(object): subprocess.call( [- 'git',+ '@git_exec@', "--git-dir=%s" % self.git_dir, "--work-tree=%s" % self.path, 'init',@@ -298,7 +287,7 @@ class PasswordStore(object): subprocess.call( [- 'git',+ '@git_exec@', "--git-dir=%s" % self.git_dir, "--work-tree=%s" % self.path, 'config',@@ -311,7 +300,7 @@ class PasswordStore(object): subprocess.call( [- 'git',+ '@git_exec@', "--git-dir=%s" % self.git_dir, "--work-tree=%s" % self.path, 'config',@@ -326,7 +315,7 @@ class PasswordStore(object): subprocess.call( [- 'git',+ '@git_exec@', "--git-dir=%s" % self.git_dir, "--work-tree=%s" % self.path, 'add',@@ -338,7 +327,7 @@ class PasswordStore(object): if message: subprocess.call( [- 'git',+ '@git_exec@', "--git-dir=%s" % self.git_dir, "--work-tree=%s" % self.path, 'commit',@@ -350,7 +339,7 @@ class PasswordStore(object): else: subprocess.call( [- 'git',+ '@git_exec@', "--git-dir=%s" % self.git_dir, "--work-tree=%s" % self.path, 'commit'diff --git a/pypass/tests/test_command.py b/pypass/tests/test_command.pyindex 4966b34..960a8ed 100644--- a/pypass/tests/test_command.py+++ b/pypass/tests/test_command.py@@ -127,7 +127,7 @@ class TestCommand(unittest.TestCase): # Check if the password is in the clipoard xclip = subprocess.Popen(- ['xclip', '-o', '-selection', 'clipboard'],+ ['@xclip_exec@', '-o', '-selection', 'clipboard'], stdout=subprocess.PIPE) xclip.wait() self.assertEqual(xclip.stdout.read().decode('utf8'), 'clipme999')@@ -301,7 +301,7 @@ class TestCommand(unittest.TestCase): # git init should set diff.gpg.binary to True diff_gpg_binary = subprocess.Popen( [- 'git',+ '@git_exec@', '--git-dir=%s' % os.path.join(self.dir, '.git'), '--work-tree=%s' % self.dir, 'config',@@ -317,7 +317,7 @@ class TestCommand(unittest.TestCase): # git init should set diff.gpg.textconv to 'gpg -d' gpg = subprocess.Popen( [- 'git',+ '@git_exec@', '--git-dir=%s' % os.path.join(self.dir, '.git'), '--work-tree=%s' % self.dir, 'config',@@ -337,7 +337,7 @@ class TestCommand(unittest.TestCase): subprocess.Popen( [- 'git',+ '@git_exec@', '--git-dir=%s' % origin_git_dir, '--work-tree=%s' % origin_dir, 'init',@@ -350,7 +350,7 @@ class TestCommand(unittest.TestCase): subprocess.call( [- 'git',+ '@git_exec@', '--git-dir=%s' % origin_git_dir, '--work-tree=%s' % origin_dir, 'add', 'test_git_init_clone.gpg',@@ -359,7 +359,7 @@ class TestCommand(unittest.TestCase): subprocess.call( [- 'git',+ '@git_exec@', '--git-dir=%s' % origin_git_dir, '--work-tree=%s' % origin_dir, 'commit',diff --git a/pypass/tests/test_passwordstore.py b/pypass/tests/test_passwordstore.pyindex 6decc5f..ceb5181 100644--- a/pypass/tests/test_passwordstore.py+++ b/pypass/tests/test_passwordstore.py@@ -171,7 +171,7 @@ class TestPasswordStore(unittest.TestCase): subprocess.Popen( [- 'git',+ '@git_exec@', '--git-dir=%s' % os.path.join(origin_dir, '.git'), '--work-tree=%s' % origin_dir, 'init',@@ -184,7 +184,7 @@ class TestPasswordStore(unittest.TestCase): subprocess.Popen( [- 'git',+ '@git_exec@', '--git-dir=%s' % os.path.join(origin_dir, '.git'), '--work-tree=%s' % origin_dir, 'add', 'test_git_init_clone.gpg',@@ -193,7 +193,7 @@ class TestPasswordStore(unittest.TestCase): subprocess.Popen( [- 'git',+ '@git_exec@', '--git-dir=%s' % os.path.join(origin_dir, '.git'), '--work-tree=%s' % origin_dir, 'commit',