Skip to content

Commit

Permalink
Consistent to how we log things for Go (#150)
Browse files Browse the repository at this point in the history
Adds log messages to show up CARGO_HOME and RUSTUP_HOME paths to the end user
  • Loading branch information
Ridai Govinda Pombo authored Aug 13, 2020
1 parent d48213d commit c4a74e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion buildpacks/rust.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ func (bt RustBuildTool) Setup(ctx context.Context, rustDir string) error {
t := bt.spec.InstallTarget

t.PrependToPath(ctx, filepath.Join(rustDir, "bin"))
rustCargoHome := filepath.Join(t.ToolOutputSharedDir(ctx), "rust", bt.Version())

t.SetEnv("CARGO_HOME", filepath.Join(t.ToolOutputSharedDir(ctx), "rust", bt.Version()))
log.Infof("Setting CARGO_HOME to %s", rustCargoHome)
t.SetEnv("CARGO_HOME", rustCargoHome)
log.Infof("Setting RUSTUP_HOME to %s", rustDir)
t.SetEnv("RUSTUP_HOME", rustDir)

return nil
Expand Down

0 comments on commit c4a74e8

Please sign in to comment.