Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always installs latest version of code server #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mahesha999
Copy link

Removes hardcoded vscode version CODESERVER_VERSION. Thus, it always installs latest version of code server. With hard coded version, I was unable to install the extensions from the vscode extensions marketplace. Also it seems that ngrok now requires users to create authtoken. So, this version might need users to provide their authtoken:

ColabCode(port=80, password="<enter-password>", mount_drive=True, authtoken='<enter-your-ngrok-auth-token>`)

Sample colab notebook to boot up with colabcode.

@@ -48,7 +48,8 @@ def __init__(
def _install_code():
subprocess.run(["wget", "https://code-server.dev/install.sh"], stdout=subprocess.PIPE)
subprocess.run(
["sh", "install.sh", "--version", f"{CODESERVER_VERSION}"],
# ["sh", "install.sh", "--version", f"{CODESERVER_VERSION}"],
Copy link

@sb0210 sb0210 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall Code can be improved.
output of subprocess.run command is not taken care of.
Comments can be removed.

def _install_code():
    result = subprocess.run(["wget", "https://code-server.dev/install.sh"], stdout=subprocess.PIPE)
    if result.returncode != 0:
        raise RuntimeError("Failed to download installation script")
        
    result = subprocess.run(["sh", "install.sh"], stdout=subprocess.PIPE)
    if result.returncode != 0:
        raise RuntimeError("Failed to run installation script")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants