jpillora / media-sort

Automatically organise your movies and tv series
MIT License
121 stars 21 forks source link

[opts] Process error: argslists and commands cannot be used together #14

Closed dapperfu closed 5 years ago

dapperfu commented 5 years ago

Install command:

go get -v github.com/jpillora/media-sort

Error:

[opts] Process error: argslists and commands cannot be used together

The only place I can find that string is here.

https://github.com/jpillora/opts/pull/8#issuecomment-481667689

ghost commented 5 years ago

Working here

dapperfu commented 5 years ago

Odd, I just tested it with this script on 2 different platforms and it just fails. I don't know enough about go to know how it handles dependencies or caching.

$ ./media-sort-issue14.sh 
github.com/jpillora/media-sort (download)
# Running media-sort
[opts] Process error: argslists and commands cannot be used together

media-sort git revision
commit 320596944d8b5515649dcf1815abce80d0f0849f (HEAD -> master, origin/master, origin/HEAD)
Merge: 485b318 fa1a037
Author: Jaime Pillora <jpillora@gmail.com>
Date:   Wed Nov 13 11:09:15 2019 +1100

    Merge pull request #15 from jed-frey/jed-frey-patch-1

    Fixed example flag

go version:
go version go1.12.6 freebsd/amd64
$ ./media-sort-issue14.sh 
github.com/jpillora/media-sort (download)
# Running media-sort
[opts] Process error: argslists and commands cannot be used together

# media-sort git revision
commit 320596944d8b5515649dcf1815abce80d0f0849f (HEAD -> master, origin/master, origin/HEAD)
Merge: 485b318 fa1a037
Author: Jaime Pillora <jpillora@gmail.com>
Date:   Wed Nov 13 11:09:15 2019 +1100

    Merge pull request #15 from jed-frey/jed-frey-patch-1

    Fixed example flag

# go version:
go version go1.13.1 linux/amd64
# Host System:
Linux m6700 5.3.0-050300-generic #201909152230 SMP Sun Sep 15 22:32:54 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Pop!_OS 18.04 LTS
Release:    18.04
Codename:   bionic

media-sort-issue14.sh sort:

#!/usr/bin/env bash

# Remove everything in go path
rm -rf $GOPATH/*
go get -v github.com/jpillora/media-sort
# Throws error:
## [opts] Process error: argslists and commands cannot be used together
echo "# Running media-sort"
$GOPATH/bin/media-sort
echo ""
echo "# media-sort git revision"
cd $GOPATH/src/github.com/jpillora/media-sort
git log -n1
echo ""
echo "# go version:"
go version
echo "# Host System:"
uname -a
lsb_release -a
jpillora commented 5 years ago

What version of Go are you using?

On Fri, 15 Nov 2019 at 9:42 am Jed notifications@github.com wrote:

Odd, I just tested it with this script on 2 different platforms and it just fails. I don't know enough about go to know how it handles dependencies or caching.

$ ./media-sort-issue14.sh github.com/jpillora/media-sort (download)

Running media-sort

[opts] Process error: argslists and commands cannot be used together

media-sort git revision commit 320596944d8b5515649dcf1815abce80d0f0849f (HEAD -> master, origin/master, origin/HEAD) Merge: 485b318 fa1a037 Author: Jaime Pillora jpillora@gmail.com Date: Wed Nov 13 11:09:15 2019 +1100

Merge pull request #15 from jed-frey/jed-frey-patch-1

Fixed example flag

go version: go version go1.12.6 freebsd/amd64

$ ./media-sort-issue14.sh github.com/jpillora/media-sort (download)

Running media-sort

[opts] Process error: argslists and commands cannot be used together

media-sort git revision

commit 320596944d8b5515649dcf1815abce80d0f0849f (HEAD -> master, origin/master, origin/HEAD) Merge: 485b318 fa1a037 Author: Jaime Pillora jpillora@gmail.com Date: Wed Nov 13 11:09:15 2019 +1100

Merge pull request #15 from jed-frey/jed-frey-patch-1

Fixed example flag

go version:

go version go1.13.1 linux/amd64

Host System:

Linux m6700 5.3.0-050300-generic #201909152230 SMP Sun Sep 15 22:32:54 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux No LSB modules are available. Distributor ID: Ubuntu Description: Pop!_OS 18.04 LTS Release: 18.04 Codename: bionic

media-sort-issue14.sh sort:

!/usr/bin/env bash

Remove everything in go path

rm -rf $GOPATH/* go get -v github.com/jpillora/media-sort

Throws error:

[opts] Process error: argslists and commands cannot be used together

echo "# Running media-sort" $GOPATH/bin/media-sort echo "" echo "# media-sort git revision" cd $GOPATH/src/github.com/jpillora/media-sort git log -n1 echo "" echo "# go version:" go version echo "# Host System:" uname -a lsb_release -a

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/media-sort/issues/14?email_source=notifications&email_token=AAE2X43NOK3EMPNLEJVIWE3QTXH5XA5CNFSM4JMLQ26KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEDSIFY#issuecomment-554116119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X42HBR4ZXGMSW72X47TQTXH5XANCNFSM4JMLQ26A .

ghost commented 5 years ago

It says in the output go1.12.6 on freebsd (which works for me btw also on freebsd) and go 1.13.1 on linux

On Thu, Nov 14, 2019, at 7:48 PM, Jaime Pillora wrote:

What version of Go are you using?

On Fri, 15 Nov 2019 at 9:42 am Jed notifications@github.com wrote:

Odd, I just tested it with this script on 2 different platforms and it just fails. I don't know enough about go to know how it handles dependencies or caching.

$ ./media-sort-issue14.sh github.com/jpillora/media-sort (download)

Running media-sort

[opts] Process error: argslists and commands cannot be used together

media-sort git revision commit 320596944d8b5515649dcf1815abce80d0f0849f (HEAD -> master, origin/master, origin/HEAD) Merge: 485b318 fa1a037 Author: Jaime Pillora jpillora@gmail.com Date: Wed Nov 13 11:09:15 2019 +1100

Merge pull request #15 from jed-frey/jed-frey-patch-1

Fixed example flag

go version: go version go1.12.6 freebsd/amd64

$ ./media-sort-issue14.sh github.com/jpillora/media-sort (download)

Running media-sort

[opts] Process error: argslists and commands cannot be used together

media-sort git revision

commit 320596944d8b5515649dcf1815abce80d0f0849f (HEAD -> master, origin/master, origin/HEAD) Merge: 485b318 fa1a037 Author: Jaime Pillora jpillora@gmail.com Date: Wed Nov 13 11:09:15 2019 +1100

Merge pull request #15 from jed-frey/jed-frey-patch-1

Fixed example flag

go version:

go version go1.13.1 linux/amd64

Host System:

Linux m6700 5.3.0-050300-generic #201909152230 SMP Sun Sep 15 22:32:54 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux No LSB modules are available. Distributor ID: Ubuntu Description: Pop!_OS 18.04 LTS Release: 18.04 Codename: bionic

media-sort-issue14.sh sort:

!/usr/bin/env bash

Remove everything in go path

rm -rf $GOPATH/* go get -v github.com/jpillora/media-sort

Throws error:

[opts] Process error: argslists and commands cannot be used

together echo "# Running media-sort" $GOPATH/bin/media-sort echo "" echo "# media-sort git revision" cd $GOPATH/src/github.com/jpillora/media-sort git log -n1 echo "" echo "# go version:" go version echo "# Host System:" uname -a lsb_release -a

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub

https://github.com/jpillora/media-sort/issues/14?email_source=notifications&email_token=AAE2X43NOK3EMPNLEJVIWE3QTXH5XA5CNFSM4JMLQ26KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEDSIFY#issuecomment-554116119, or unsubscribe

https://github.com/notifications/unsubscribe-auth/AAE2X42HBR4ZXGMSW72X47TQTXH5XANCNFSM4JMLQ26A .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jpillora/media-sort/issues/14?email_source=notifications&email_token=AAAAHVAQ5RTVI6KOW3ZMKUDQTXWXLA5CNFSM4JMLQ26KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEED4GHQ#issuecomment-554156830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAHVG7XPO27RFADYEPMBDQTXWXLANCNFSM4JMLQ26A.

ghost commented 5 years ago

Also try to rm -rf ~/.cache/go-build just for the hell of it. Have you tried this on a clean system in a vm with no dotfile customization?

dapperfu commented 5 years ago

Brand new FreeBSD 12.0 iocage jail:

root@media-sort:~ # pkg update -f ; pkg install -y lang/go
root@media-sort:~ # go version
go version go1.13.1 freebsd/amd64
  1. Everything in /root deleted
  2. Jail restarted.
  3. go get -v github.com/jpillora/media-sort
  4. Same error:
$ jexec 8 su -
# ls -lah
total 14
drwxr-xr-x   2 root  wheel     3B Nov 17 18:47 .
drwxr-xr-x  18 root  wheel    22B Nov 15 02:14 ..
-rw-------   1 root  wheel   878B Nov 17 18:47 .history
# go get -v github.com/jpillora/media-sort
github.com/jpillora/media-sort (download)
created GOPATH=/root/go; see 'go help gopath'
github.com/jpillora/media-sort/vendor/github.com/agnivade/levenshtein
github.com/jpillora/media-sort/vendor/github.com/mattn/go-isatty
github.com/jpillora/media-sort/vendor/github.com/jpillora/sizestr
github.com/jpillora/media-sort/vendor/github.com/kardianos/osext
github.com/jpillora/media-sort/vendor/github.com/mattn/go-colorable
github.com/jpillora/media-sort/vendor/golang.org/x/sys/unix
github.com/jpillora/media-sort/vendor/github.com/jpillora/opts
github.com/jpillora/media-sort/vendor/github.com/fatih/color
github.com/jpillora/media-sort/search
github.com/jpillora/media-sort/vendor/gopkg.in/fsnotify.v1
github.com/jpillora/media-sort/sort
github.com/jpillora/media-sort
# ./go/bin/media-sort 
[opts] Process error: argslists and commands cannot be used together

Digging deeper, go itself is getting the wrong version of opts with the go get command.

# grep opts /root/go/src/github.com/jpillora/media-sort/vendor/modules.txt 
# github.com/jpillora/opts v0.0.0-20160806153215-3f7962811f23
github.com/jpillora/opts

However if I go to the media-sort directory and use go build it figules it out:

# cd /root/go/src/github.com/jpillora/media-sort
# go build
# ./media-sort