Fix random bugs related to using garage cli tools

This commit is contained in:
Brian Picciano 2022-11-08 14:54:31 +01:00
parent c4b7abbcc4
commit 838c548706
2 changed files with 6 additions and 5 deletions

View File

@ -78,6 +78,6 @@ storage:
#- data_path: /foo/bar/data
# meta_path: /foo/bar/meta
# capacity: 1200
# #s3_api_port: 3900
# #rpc_port: 3901
# #rpc_port: 3900
# #s3_api_port: 3901
# #admin_port: 3902

View File

@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"path/filepath"
"syscall"
)
@ -55,7 +56,7 @@ var subCmdGarageMC = subCmd{
args = append([]string{"mc"}, args...)
var (
binPath = "mc"
binPath = filepath.Join(envAppDirPath, "bin/mc")
cliEnv = append(
os.Environ(),
fmt.Sprintf(
@ -92,11 +93,11 @@ var subCmdGarageCLI = subCmd{
}
var (
binPath = "garage"
binPath = filepath.Join(envAppDirPath, "bin/garage")
args = append([]string{"garage"}, subCmdCtx.args...)
cliEnv = append(
os.Environ(),
"GARAGE_RPC_HOST="+hostBootstrap.ChooseGaragePeer().RPCAddr(),
"GARAGE_RPC_HOST="+hostBootstrap.ChooseGaragePeer().RPCPeerAddr(),
"GARAGE_RPC_SECRET="+hostBootstrap.Garage.RPCSecret,
)
)