Skip to content

Commit

Permalink
chore: Use meaningful variable name. -fn +composeFileName
Browse files Browse the repository at this point in the history
Signed-off-by: Thorsten Hans <[email protected]>
  • Loading branch information
ThorstenHans committed Oct 10, 2024
1 parent 26e4f33 commit 4dea516
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ func setUp(s Stack) error {
if err := checkDocker(); err != nil {
return err
}
fn := s.GetComposeFileName()
composeFile := path.Join(otelConfigPath, fn)
if _, err := os.Stat(composeFile); os.IsNotExist(err) {
return fmt.Errorf("The \"otel-config\" directory is missing the \"%s\" file, so please consider removing and re-installing the otel plugin", fn)
composeFileName := s.GetComposeFileName()
composeFilePath := path.Join(otelConfigPath, composeFileName)
if _, err := os.Stat(composeFilePath); os.IsNotExist(err) {
return fmt.Errorf("The \"otel-config\" directory is missing the \"%s\" file, so please consider removing and re-installing the otel plugin", composeFileName)
}

cmd := exec.Command("docker", "compose", "-f", composeFile, "up", "-d")
cmd := exec.Command("docker", "compose", "-f", composeFilePath, "up", "-d")

fmt.Println("Pulling and running Spin OTel resources...")

Expand Down

0 comments on commit 4dea516

Please sign in to comment.