Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-23 21:31:29 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-23 21:31:29 +0000
commit53a57300cc3e322d9e10ce30ad03a8b00d7a0009 (patch)
treea34a6885b73dd0cc6262aff7d9da08e55da913e5
parentb3e9505fab33af0e2420c98cea9b0b5dc9949677 (diff)
Fixed which statement. It's a builtin and not a /usr/bin command
-rw-r--r--archinstall.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/archinstall.py b/archinstall.py
index 2b3cc302..783db347 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -7,7 +7,7 @@ from glob import glob
from select import epoll, EPOLLIN, EPOLLHUP
from socket import socket, inet_ntoa, AF_INET, AF_INET6, AF_PACKET
from collections import OrderedDict as oDict
-from subprocess import Popen, STDOUT, PIPE
+from subprocess import Popen, STDOUT, PIPE, check_output
from random import choice
from string import ascii_uppercase, ascii_lowercase, digits
from hashlib import sha512
@@ -235,9 +235,10 @@ class sys_command():#Thread):
if not self.cmd[0][0] == '/':
log('Worker command is not executed with absolute path, trying to find: {}'.format(self.cmd[0]), origin='spawn', level=5)
- o = sys_command('/usr/bin/which {}'.format(self.cmd[0]), emulate=False, hide_from_log=True)
+ o = check_output(['which', self.cmd[0]])
+ ##o = sys_command('sh which {}'.format(self.cmd[0]), emulate=False, hide_from_log=True)
log('This is the binary {} for {}'.format(o.decode('UTF-8'), self.cmd[0]), origin='spawn', level=5)
- self.cmd[0] = o.decode('UTF-8')
+ self.cmd[0] = o.decode('UTF-8').strip()
if not os.path.isdir(self.exec_dir):
os.makedirs(self.exec_dir)