Closed jrfondren closed 4 years ago
build failures are due to deprecations unrelated to this PR.
No issues tracker. Is this fork dead?
just renamed a bunch of internal sites to not reuse filenames (such as index.rs) due to this:
$ rm -rf ~/.cache/cargo-eval/
$ cat eval1/hi.rs
#! /usr/bin/env cargo-eval
fn main() { println!("hello eval1/hi.rs") }
$ cat eval2/hi.rs
#! /usr/bin/env cargo-eval
fn main() { println!("hello eval2/hi.rs") }
$ ./eval1/hi.rs
hello eval1/hi.rs
$ ./eval2/hi.rs
hello eval2/hi.rs
$ ./eval1/hi.rs
hello eval2/hi.rs
$
and encountered the same problem at the commandline:
$ cargo eval -e 'let x: i16 = -32767; x.abs()'
32767
$ cargo eval -e 'let x: i16 = -32768; x.abs()'
32767
@jrfondren, sorry, I completely missed this apparently.
Merged in https://github.com/reitermarkus/cargo-eval/commit/5f07a45e13d789a613d70f6353455a7fd7c15ad7.
Consider a script named 'nohelp.rs':
This script is intended to just print its first argument, but unfortunately it silently has many invalid arguments due to clap's suggestions feature:
This PR disables that. Note that, even with 'suggestions' disabled, something like the unfortunate #! there is required, as 'help' and other arguments can still get snatched out of the arguments intended for a script:
and as used: