Skip to content

Commit

Permalink
fix update command
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <[email protected]>
  • Loading branch information
fenollp committed Oct 12, 2022
1 parent 56a9902 commit 95121d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
EXE ?= monkey

all: pkg/internal/fm/fuzzymonkey.pb.go make_README.sh README.md lint
CGO_ENABLED=0 go build -o $(EXE) -ldflags '-s -w' $(if $(wildcard $(EXE)),|| (rm $(EXE) && false))
CGO_ENABLED=0 go build -o $(EXE) $(if $(wildcard $(EXE)),|| (rm $(EXE) && false))
cat .gitignore >.dockerignore && echo /.git >>.dockerignore
./$(EXE) fmt -w && ./make_README.sh

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ curl -#fL https://raw.githubusercontent.com/FuzzyMonkeyCo/monkey/master/.godownl

With Docker:
```shell
DOCKER_BUILDKIT=1 docker build -o=. --platform=local git://github.com/FuzzyMonkeyCo/monkey
DOCKER_BUILDKIT=1 docker build -o=/usr/local/bin --platform=local https://github.com/FuzzyMonkeyCo/monkey.git

# or the faster:
DOCKER_BUILDKIT=1 docker build -o=. --platform=local --build-arg PREBUILT=1 git://github.com/FuzzyMonkeyCo/monkey
DOCKER_BUILDKIT=1 docker build -o=/usr/local/bin --platform=local --build-arg PREBUILT=1 https://github.com/FuzzyMonkeyCo/monkey.git
```

Or simply install the [latest release](https://github.com/FuzzyMonkeyCo/monkey/releases/latest).
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ func actualMain() int {
return doEnv(args.EnvVars)
}

if args.Update {
return doUpdate()
}

if err := cwid.MakePwdID(binName, args.File, 0); err != nil {
as.ColorERR.Println(err) // Print as LogFile isn't set up yet
return code.Failed
Expand All @@ -85,10 +89,6 @@ func actualMain() int {
log.Printf("[ERR] (not an error) %s %s %#v", binTitle, cwid.LogFile(), args)
defer func() { log.Printf("[ERR] (not an error) ran for %s", time.Since(start)) }()

if args.Update {
return doUpdate()
}

if args.Fmt {
if err := rt.Format(args.File, args.FmtW); err != nil {
if e, ok := err.(rt.FmtError); ok {
Expand Down

0 comments on commit 95121d4

Please sign in to comment.