Skip to content

Commit

Permalink
fix lint and unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdimiceli committed Aug 22, 2024
1 parent 618bb14 commit f0efeb5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
22 changes: 12 additions & 10 deletions commands/usage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ Usage:
bbl [GLOBAL OPTIONS] COMMAND [OPTIONS]
Global Options:
--help [-h] Prints usage. Use "bbl [command] --help" for more information about a command
--state-dir [-s] Directory containing the bbl state env:"BBL_STATE_DIRECTORY"
--debug [-d] Prints debugging output env:"BBL_DEBUG"
--version [-v] Prints version
--no-confirm [-n] No confirm
--help [-h] Prints usage. Use "bbl [command] --help" for more information about a command
--state-dir [-s] Directory containing the bbl state env:"BBL_STATE_DIRECTORY"
--debug [-d] Prints debugging output env:"BBL_DEBUG"
--version [-v] Prints version
--no-confirm [-n] No confirm
--use-tf-local-binary [-u] Use the local terraform binary if it exists env:"BBL_USE_TF_LOCAL_BINARY"
Basic Commands: A good place to start
up Deploys BOSH director on an IAAS, creates CF/Concourse load balancers. Updates existing director.
Expand Down Expand Up @@ -84,11 +85,12 @@ Troubleshooting Commands:
bbl [GLOBAL OPTIONS] my-command [OPTIONS]
Global Options:
--help [-h] Prints usage. Use "bbl [command] --help" for more information about a command
--state-dir [-s] Directory containing the bbl state env:"BBL_STATE_DIRECTORY"
--debug [-d] Prints debugging output env:"BBL_DEBUG"
--version [-v] Prints version
--no-confirm [-n] No confirm
--help [-h] Prints usage. Use "bbl [command] --help" for more information about a command
--state-dir [-s] Directory containing the bbl state env:"BBL_STATE_DIRECTORY"
--debug [-d] Prints debugging output env:"BBL_DEBUG"
--version [-v] Prints version
--no-confirm [-n] No confirm
--use-tf-local-binary [-u] Use the local terraform binary if it exists env:"BBL_USE_TF_LOCAL_BINARY"
[my-command command options]
some message
Expand Down
8 changes: 4 additions & 4 deletions terraform/binary_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ func NewBinary(tfUseLocalBinary bool) *Binary {
func (binary *Binary) BinaryPath() (string, error) {
// if user has a terraform use it
if binary.UseLocalBinary {
userTerraform, err := exec.LookPath(tfBinDataAssetName)
if err == nil && userTerraform != "" {
return userTerraform, nil
}
userTerraform, err := exec.LookPath(tfBinDataAssetName)
if err == nil && userTerraform != "" {
return userTerraform, nil
}
}

destinationPath := fmt.Sprintf("%s/%s", binary.FS.GetTempDir(os.TempDir()), bblTfBinaryName)
Expand Down

0 comments on commit f0efeb5

Please sign in to comment.