Fix rg extraction in Docker build
This commit is contained in:
parent
b0e6c1cc4e
commit
2be452d83e
@ -1,7 +1,11 @@
|
|||||||
Dockerfile
|
Dockerfile
|
||||||
doc/
|
build
|
||||||
|
deployment
|
||||||
|
doc
|
||||||
|
.git
|
||||||
.github
|
.github
|
||||||
.gitignore
|
.gitignore
|
||||||
|
.node-version
|
||||||
.travis.yml
|
.travis.yml
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
|
@ -99,7 +99,7 @@ function build-code-server() {
|
|||||||
log "Installing remote dependencies"
|
log "Installing remote dependencies"
|
||||||
cd "${vscodeSourcePath}/remote"
|
cd "${vscodeSourcePath}/remote"
|
||||||
yarn --production --force --build-from-source
|
yarn --production --force --build-from-source
|
||||||
cp -r "${vscodeSourcePath}/remote/node_modules" "${codeServerBuildPath}"
|
mv "${vscodeSourcePath}/remote/node_modules" "${codeServerBuildPath}"
|
||||||
|
|
||||||
# Only keep the production dependencies.
|
# Only keep the production dependencies.
|
||||||
cd "${codeServerBuildPath}/out/vs/server"
|
cd "${codeServerBuildPath}/out/vs/server"
|
||||||
|
@ -122,10 +122,12 @@ export const open = async (url: string): Promise<void> => {
|
|||||||
*/
|
*/
|
||||||
export const unpackExecutables = async (): Promise<void> => {
|
export const unpackExecutables = async (): Promise<void> => {
|
||||||
const rgPath = (rg as any).binaryRgPath;
|
const rgPath = (rg as any).binaryRgPath;
|
||||||
if (rgPath) {
|
const destination = path.join(tmpdir, path.basename(rgPath || ""));
|
||||||
|
if (rgPath && !(await util.promisify(fs.exists)(destination))) {
|
||||||
await mkdirp(tmpdir);
|
await mkdirp(tmpdir);
|
||||||
const destination = path.join(tmpdir, path.basename(rgPath));
|
// TODO: I'm not sure why but copyFile doesn't work in the Docker build.
|
||||||
await util.promisify(fs.copyFile)(rgPath, destination);
|
// await util.promisify(fs.copyFile)(rgPath, destination);
|
||||||
|
await util.promisify(fs.writeFile)(destination, await util.promisify(fs.readFile)(rgPath));
|
||||||
await util.promisify(fs.chmod)(destination, "755");
|
await util.promisify(fs.chmod)(destination, "755");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user