Commit f4c99ad7 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'bf/validate_password' into 'master'

BF: Bad call to sudo_popen by validate_admin_password function, and wrong attr name

See merge request fsl/conda/installer!22
parents e2dc7a0b c55ee49d
......@@ -52,7 +52,7 @@ log = logging.getLogger(__name__)
__absfile__ = op.abspath(__file__).rstrip('c')
__version__ = '1.3.5'
__version__ = '1.3.6'
"""Installer script version number. This must be updated
whenever a new version of the installer script is released.
"""
......@@ -445,7 +445,7 @@ class Context(object):
"""Prompt the user for their administrator password."""
def validate_admin_password(password):
proc = Process.sudo_popen(['true'], password)
proc = Process.sudo_popen(['true'], password, stdin=sp.PIPE)
proc.communicate()
return proc.returncode == 0
......@@ -1016,7 +1016,7 @@ class Process(object):
admin = admin and os.getuid() != 0
if admin: password = ctx.password
if admin: password = ctx.admin_password
else: password = None
cmd = shlex.split(cmd)
......@@ -1203,6 +1203,11 @@ def install_miniconda(ctx):
cmd = 'sh miniconda.sh -b -p {}'.format(ctx.destdir)
Process.monitor_progress(cmd, output, ctx.need_admin, ctx)
# Avoid WSL filesystem issue
# https://github.com/conda/conda/issues/9948
cmd = 'find {} -type f -exec touch {{}} +'.format(ctx.destdir)
Process.check_call(cmd, ctx.need_admin, ctx)
# Create .condarc config file
condarc = tw.dedent("""
# Try and make package downloads more robust
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment