hello_world/hello_world.rs
1use pass_tool::{actions::write_file, checks::is_file, instruction, run_cli, Playbook};
2
3fn main() {
4 let file_path = "pass-example__hello_world.txt";
5 let playbook = Playbook::new(
6 "Hello world",
7 "This example creates file with \"Hello, world!\" text, if file already exists it will do nothing",
8 [],
9 [instruction(write_file(file_path, "Hello, world!")).confirm(is_file(file_path))],
10 );
11 run_cli(playbook, include_str!("hello_world.rs"));
12}