(contrived output ā both cases, with and without ./ prefix, must be fixed)
Actual Behavior
$ scriptisto --version # built from Git
scriptisto 0.6.14-alpha.0
$ scriptisto new rust >bin/foo.rs
$ chmod +x bin/foo.rs
$ ./bin/foo.rs
Error: ErrorMessage { msg: "\"./bin/foo.rs\" is not found or not executable" }
$ bin/foo.rs
Error: ErrorMessage { msg: "\"bin/foo.rs\" is not found or not executable" }
The fix for #26 has introduced this bug since bin/foo.rs isn't on the PATH. Searching the PATH doesn't solve the use cases. The first command line argument is a file path, potentially containing slashes, and not a name of an executable (which can never contain slashes). One could check it with Path::new("bin/foo.rs").exists(), if needed by the code to distinguish from subcommands.
Specifications
Version: scriptisto 0.6.14-alpha.0 (built from commit f9ef3bd)
Platform: macOS
Workaround
Had to revert to 0.6.10 to at least get the ./some-script syntax to work correctly.
Expected Behavior
(contrived output ā both cases, with and without
./
prefix, must be fixed)Actual Behavior
The fix for #26 has introduced this bug since
bin/foo.rs
isn't on the PATH. Searching the PATH doesn't solve the use cases. The first command line argument is a file path, potentially containing slashes, and not a name of an executable (which can never contain slashes). One could check it withPath::new("bin/foo.rs").exists()
, if needed by the code to distinguish from subcommands.Specifications
Workaround
Had to revert to 0.6.10 to at least get the
./some-script
syntax to work correctly.