From 26edea5098d99a03736977c6977ab53c3547d446 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Sat, 9 Mar 2019 18:41:07 -0500 Subject: [PATCH 1/2] Update docker oneliner and fix clone task --- README.md | 2 +- build/tasks.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a4ac351..86847be7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Try it out: ```bash -docker run -t -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" codercom/code-server code-server --allow-http --no-auth +docker run -t -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" codercom/code-server --allow-http --no-auth ``` - Code on your Chromebook, tablet, and laptop with a consistent dev environment. diff --git a/build/tasks.ts b/build/tasks.ts index db0353f2..d7cc6283 100644 --- a/build/tasks.ts +++ b/build/tasks.ts @@ -241,6 +241,10 @@ const ensureClean = register("vscode:clean", async (runner) => { throw new Error(`Failed to remove unstaged files: ${removeUnstaged.stderr}`); } } + const fetch = await runner.execute("git", ["fetch", "--prune"]); + if (fetch.exitCode !== 0) { + throw new Error(`Failed to fetch latest changes: ${fetch.stderr}`); + } }); const ensurePatched = register("vscode:patch", async (runner) => { From 449d51d24d38fc6a4ef915224f72853b5352ad94 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Sat, 9 Mar 2019 18:45:56 -0500 Subject: [PATCH 2/2] Dockerfile: use relative path instead of $PWD for CMD Thanks @ay-b --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e2139cbe..dbe56137 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,5 +29,4 @@ RUN apt-get install -y locales && \ # configured in /etc/default/locale so we need to set it manually. ENV LANG=en_US.UTF-8 ENTRYPOINT code-server -# Unfortunately `.` does not work with code-server so we use shell form. -CMD code-server $PWD +CMD ["."]