

def chhome(name, home):
    "\n    Change the home directory of the user\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' user.chhome foo /Users/foo\n    "
    pre_info = info(name)
    if (not pre_info):
        raise CommandExecutionError("User '{0}' does not exist".format(pre_info))
    if (home == pre_info['home']):
        return True
    _dscl(['/Users/{0}'.format(name), 'NFSHomeDirectory', pre_info['home'], home], ctype='change')
    time.sleep(1)
    return (info(name).get('home') == home)

dataset/ETHPy150Open saltstack/salt/salt/modules/mac_user.py chhome/VarMisuse@36/118 `name`->`pre_info`