The API now requires a command argument from signature. Parsing errors
(no command from input) is thrown as a custom exception, and caught by
the outmost possible invocation to emit a message from click.
- Use os.path.join instead of os.path.sep.join
- This prevents strange test errors when there are slashes in either parts
- Better test reporting
- Cleanup
I chose to make Script.parse to always operate in POSIX mode so it is much
easier to write commands compatible on all platforms.
Script.cmdify is the important part on Windows. It ensures the argument
line is always escaped and joined properly on Windows, not just for the
subset that works both under POSIX and Windows (as is the case of
shlex.escape).
- Fix requirement parsing
- Add appveyor config
- cutover from pathlib to pathlib2 if needed
- Pin pathlib2==2.1.0 to avoid scandir
- Windows script runner fix
- Backport `shlex.quote()` for use in `pipenv run`
- Update tests and appveyor
Signed-off-by: Dan Ryan <dan@danryan.co>
1. is_vcs requires (req.path or req.uri) to be truthy.
2. (req.path or req.uri) would be true in first if statement
Thus if you have:
```
if (req.uri or req.path or ...) and not req.vcs
elif req.vcs or is_vcs(req.path)
```
if `is_vcs(req.path)` is Truthy, then the first if clause must be
truthy, so it's unnecessary.
Also add a quick test to confirm that originating purpose for that check
is now handled otherwise.
1. Only use split() when we actually come in from CLI (possibly never
need to do that at all)
2. Add some additional test cases to cover quoting.
3. Better error message in case of missing executable pulled from a run
script.
E.g.:
```
[scripts]
random = "myexecutable a b c"
myexecutable = "echo 5"
```
```
Error: the command myexecutable (from random) could not be found within PATH.
```
vs. previous, which had a slightly disingenous error message.
```
Error: the command myexecutable could not be found within PATH or Pipfile's [scripts].
```