spack find does not accept same specs as other commands

Created on 10 Jan 2017  路  3Comments  路  Source: spack/spack

The following works:

$ spack find hdf5~mpi

but the following equivalent command does not:

$ spack find hdf5 -mpi
usage: spack find [-h] [-s | -p | -d] [-l] [-L] [-f] [-e | -E] [-u] [-m] [-v]
                  [-M] [-N]
                  [constraint [constraint ...]]
spack find: error: argument -p/--paths: ignored explicit argument 'i'
bug commands

Most helpful comment

@alalazo: already fixed -- I looked at the commands and only find and module use this at the moment, always in the last arg position. PR coming

All 3 comments

That is due to @alalazo in 5b5894af. @alalazo: is there a reason you changed this to nargs='*' as opposed to using nargs=argparse.REMAINDER? In general the spec parsing should use REMAINDER to avoid the issue above with dashes.

@tgamblin Not really. I think it's just lack of tests + the fact that I never used -mpi to substitute ~mpi. If there's no hurry I'll self assign this to me and have a look at it tomorrow.

@alalazo: already fixed -- I looked at the commands and only find and module use this at the moment, always in the last arg position. PR coming

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cwsmith picture cwsmith  路  3Comments

eschnett picture eschnett  路  3Comments

23skdu picture 23skdu  路  3Comments

ifelsefi picture ifelsefi  路  3Comments

hartzell picture hartzell  路  3Comments