Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Useful command-line arguments:
- `--bench`: Compile and run benchmarks. Requires a nightly toolchain.
- `--debug`: Build a debug executable, not an optimised one.
- `--force`: Force the script to be rebuilt. Useful if you want to force a recompile with a different toolchain.
- `--project`: Generate the Cargo package and print the path to it - but don't compile or run it. Effectively "unpacks" the script into a Cargo package.
- `--package`: Generate the Cargo package and print the path to it - but don't compile or run it. Effectively "unpacks" the script into a Cargo package.
- `--test`: Compile and run tests.

## Executable Scripts
Expand Down
2 changes: 1 addition & 1 deletion src/arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl Args {
)
.arg(Arg::new("gen_pkg_only")
.help("Generate the Cargo package and print the path to it, but don't compile or run it.")
.long("project")
.long("package")
.short('p')
.action(ArgAction::SetTrue)
.requires("script")
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/gen-only.script
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cd "$mytmpdir"

printf 'println!("hello, world");' > script.rs

cd $(rust-script --project script.rs)
cd $(rust-script --package script.rs)

echo "About to cargo run"
cargo run -q