/mnt/shared/bin/gofmt: invalid option name

go

#1

Running gofmt gives the error
/bin/bash: line 0: /bin/bash: /mnt/shared/bin/gofmt: invalid option name.

/mnt/shared/bin/gofmt looks like this:

#!/bin/bash -echo

$GOROOT/bin/gofmt "$@"

Running $GOROOT/bin/gofmt directly works. This script seems redundant.


#2

Thank you for sharing the script, but does someone know about a workaround to get gofmt working?


#3

export PATH="$GOROOT/bin:$PATH" should work.