message: fix: just use one run command to get files & give permission
diff: @@ -162,11 +162,8 @@ export class DockerVMBuildStrategy extends BuildStrategy<void> {
  );
  fse.writeFileSync(buildScriptPath, scriptContent);
  - let buildError: Error | undefined = undefined;
  -
  - try {
  const { stderr } = await runCommand(
  - `docker run --rm -v ${path.resolve(
  + `docker run --rm --user $(id -u):$(id -g) -v ${path.resolve(
  this._volumePaths.project
  )}:/project -v ${path.resolve(
  this._volumePaths.linkedPackages
  @@ -179,24 +176,7 @@ export class DockerVMBuildStrategy extends BuildStrategy<void> {
  stderr &&
  !fse.existsSync(path.join(this._volumePaths.project, "build"))
  ) {
  - buildError = new Error(stderr);
  - }
  - } catch (e) {
  - buildError = e;
  - }
  -
  - await runCommand(
  - `docker run --rm -v ${path.resolve(
  - this._volumePaths.project
  - )}:/project -v ${path.resolve(
  - this._volumePaths.linkedPackages
  - )}:/linked-packages ${
  - CONFIGS[language].baseImage
  - }:latest /bin/bash -c "chmod 777 ."`
  - );
  -
  - if (buildError) {
  - throw buildError;
  + throw new Error(stderr);
  }
  }
  };
  