# Path: revolver/core.py
# def run(*args, **kwargs):
#     if not env.sudo_forced:
#         return _run(*args, **kwargs)
# 
#     return sudo(*args, **kwargs)
# 
# Path: revolver/tool/nodejs_nvm.py
# def install():
# def ensure():
# def _ensure_autoload(filename):


from revolver.core import run
from revolver.tool import nodejs_nvm
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement



def install(version, _update=True):
    nodejs_nvm.ensure()

    if not version.startswith("v"):
        version = "v" + version


# Path: revolver/core.py
# def run(*args, **kwargs):
#     if not env.sudo_forced:
#         return _run(*args, **kwargs)
# 
#     return sudo(*args, **kwargs)
# 
# Path: revolver/tool/nodejs_nvm.py
# def install():
# def ensure():
# def _ensure_autoload(filename):


# Path: revolver/tool/nodejs.py
from revolver.core import run
from revolver.tool import nodejs_nvm

# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement



def install(version, _update=True):
    nodejs_nvm.ensure()

    if not version.startswith("v"):
        version = "v" + version


    status = run("nvm use %s" % version)