DanielKeep/cargo-script

(regression) can't parse cargo output on 1.16

durka opened this issue · 2 comments

durka commented

cargo 0.17.0 -vV prints a dash between "cargo" and the version number, breaking a regex somewhere:

$ cargo +1.16.0 script -e '2+2'
internal error: could not determine target filename: could not determine cargo version: output did not match expected

$ cargo +1.16.0 -vV
cargo-0.17.0-nightly (f9e5481 2017-03-03)
release: 0.17.0
commit-hash: f9e54817e53c7b9845cc7c1ede4c11e4d3e42e36
commit-date: 2017-03-03

$ cargo +stable -vV
cargo 0.21.0 (5b4b8b2ae 2017-08-12)
release: 0.21.0
commit-hash: 5b4b8b2ae3f6a884099544ce66dbb41626110ece
commit-date: 2017-08-12

... huh? What are you...

$ for V in 1.{0..19}.0 stable; do cargo +$V -V; done
error: toolchain '1.0.0-x86_64-pc-windows-msvc' is not installed
error: toolchain '1.1.0-x86_64-pc-windows-msvc' is not installed
error: toolchain '1.2.0-x86_64-pc-windows-msvc' is not installed
error: toolchain '1.3.0-x86_64-pc-windows-msvc' is not installed
error: toolchain '1.4.0-x86_64-pc-windows-msvc' is not installed
error: toolchain '1.5.0-x86_64-pc-windows-msvc' is not installed
cargo 0.7.0-nightly (1af03be 2015-12-08)
cargo 0.8.0-nightly (28a0cbb 2016-01-17)
cargo 0.9.0-nightly (8fc3fd8 2016-02-29)
cargo 0.10.0-nightly (10ddd7d 2016-04-08)
cargo 0.11.0-nightly (259324c 2016-05-20)
cargo 0.12.0-nightly (6b98d1f 2016-07-04)
cargo 0.13.0-nightly (109cb7c 2016-08-19)
cargo 0.13.0-nightly (eca9e15 2016-11-01)
cargo 0.15.0-nightly (298a012 2016-12-20)
cargo 0.16.0-nightly (6e0c18c 2017-01-27)
cargo-0.17.0-nightly (f9e5481 2017-03-03)
cargo 0.18.0 (fe7b0cdcf 2017-04-24)
cargo 0.19.0 (28d1d60d4 2017-05-16)
cargo 0.20.0 (a60d185c8 2017-07-13)
cargo 0.21.0 (5b4b8b2ae 2017-08-12)

...

Oh you can not be serious...

Fixed in 0.2.6.