Skip to content

Commit 4bf6ebc

Browse files
committed
bug fixes
1 parent 789580e commit 4bf6ebc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

mpkg/commands/cmd_doctor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def add_to_bash_startup(inp, profile_path):
6363
if script in content:
6464
logger.warning(f'{inp} already added to {profile_path}, returned.')
6565
return
66-
logger.debug(f'added to {profile_path}')
66+
logger.warning(f'{inp} added, please restart your terminal or computer.')
6767
with open(filepath, 'a') as f:
6868
f = f.write(script)
6969

@@ -82,7 +82,7 @@ def guess_repos():
8282
elif SYS == 'Linux':
8383
if MACHINE.startswith('armv') or MACHINE.startswith('aarch') or MACHINE in ['arm', 'arm64']:
8484
repos += ['main_linux_arm']
85-
if test_cmd('apt') == 0:
85+
if test_cmd('apt --version') == 0:
8686
repos += ['main_linux_arm_deb']
8787
elif MACHINE in ['x86', 'i386', 'i686', 'x86_64', 'x64', 'amd64']:
8888
repos += ['main_linux']
@@ -104,9 +104,9 @@ def print_data():
104104
print(f'SYS, MACHINE, ARCH: {SYS}, {MACHINE}, {ARCH}')
105105
print(f'\nbin_dir in PATH: {bin_available}')
106106
if not bin_available:
107-
print(' - try: mpkg doctor --fix-bin-dir')
108-
print(f"7z_command: {sevenzip_cmd}")
109-
if sevenzip_cmd.startswith('7z_not_found'):
107+
print(' - try: touch ~/.profile ~/.bashrc && mpkg doctor --fix-bin-env')
108+
print(f"\n7z_command: {sevenzip_cmd}")
109+
if sevenzip_cmd.lstrip('"').startswith('7z_not_found'):
110110
print(
111111
' - 7zip not found, try `mpkg doctor --fix-7z-path` if you have installed it')
112112
print(' - try `mpkg install 7zip` to install it')

mpkg/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def Name(softs):
276276

277277

278278
def test_cmd(cmd):
279-
return subprocess.call(cmd, stdout=subprocess.DEVNULL, shell=True)
279+
return subprocess.call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
280280

281281

282282
def Get7zPath():

0 commit comments

Comments
 (0)