Skip to content

Commit

Permalink
exclude cc/WORKSPACE when output is directory
Browse files Browse the repository at this point in the history
  • Loading branch information
amkartashov committed Jun 8, 2021
1 parent a1c349e commit d01f116
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/rbeconfigsgen/rbeconfigsgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ func genCppConfigs(r runner.Runner, o *options.Options, bazeliskPath string) (st
// Explicitly use absolute paths to avoid confusion on what's the working directory.
outputTarballPath := path.Join(o.TempWorkDir, outputTarball)
outputTarballRunnerPath := path.Join(cppProjDir, outputTarball)
if _, err := r.ExecCmd("tar", "-cf", outputTarballRunnerPath, "-C", cppConfigDir, "."); err != nil {
if _, err := r.ExecCmd("tar","-cf", outputTarballRunnerPath, "-C", cppConfigDir,
"--exclude", "WORKSPACE", "."); err != nil {
return "", fmt.Errorf("failed to archive the C++ configs into a tarball inside the toolchain container: %w", err)
}
if err := r.CopyFrom(outputTarballRunnerPath, outputTarballPath); err != nil {
Expand Down

0 comments on commit d01f116

Please sign in to comment.