Skip to content

Commit

Permalink
fix util (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
EItanya authored Dec 6, 2021
1 parent d3e29d0 commit 0ededef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Example outputs
examples/**/*.o

# Dependency directories (remove the comment below to include it)
vendor/
_output
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ build-cli: bee-linux-amd64 bee-linux-arm64

.PHONY: install-cli
install-cli:
CGO_ENABLED=0 go install -ldflags=$(LDFLAGS) -gcflags=$(GCFLAGS) bee/main.go
CGO_ENABLED=0 go install -ldflags=$(LDFLAGS) -gcflags=$(GCFLAGS) ./bee

##----------------------------------------------------------------------------------
## Release
Expand Down
8 changes: 4 additions & 4 deletions pkg/cli/internal/commands/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import (
type runOptions struct {
general *options.GeneralOptions

Debug bool
debug bool
}

var stopper chan os.Signal

func addToFlags(flags *pflag.FlagSet, opts *runOptions) {
flags.BoolVarP(&opts.Debug, "debug", "d", false, "Create a log file 'debug.log' that provides debug logs of loader and TUI execution")
flags.BoolVarP(&opts.debug, "debug", "d", false, "Create a log file 'debug.log' that provides debug logs of loader and TUI execution")
}

func Command(opts *options.GeneralOptions) *cobra.Command {
Expand Down Expand Up @@ -75,7 +75,7 @@ func run(cmd *cobra.Command, args []string, opts *runOptions) error {
}
}()

if opts.Debug {
if opts.debug {
f, err := os.OpenFile("debug.log", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
if err != nil {
log.Fatalf("error opening file: %v", err)
Expand Down Expand Up @@ -105,7 +105,7 @@ func run(cmd *cobra.Command, args []string, opts *runOptions) error {
promProvider,
)

app := tui.NewApp(opts.Debug, progLocation, progLoader)
app := tui.NewApp(opts.debug, progLocation, progLoader)
return app.Run(cmd.Context(), progReader)

}
Expand Down
4 changes: 2 additions & 2 deletions pkg/spec/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ func TryFromLocal(

_, err = oras.Copy(
ctx,
localRegistry,
ref,
remoteRegistry,
ref,
localRegistry,
"",
oras.WithAllowedMediaTypes(AllowedMediaTypes()),
)
Expand Down

0 comments on commit 0ededef

Please sign in to comment.